LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2011, 12:21 PM   #1
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 136

Rep: Reputation: 20
SU command doesn't work properly


hi everyone,
i install fedora 15,and today when i was trying to become root,it asked for password and then i confront with:
Code:
[majid@Fedora ~]$ su
Password: 
bash-4.2#
thanks in advance
 
Old 06-08-2011, 12:25 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
And what is the problem? Aren't you root now (check that with whoami)?
 
Old 06-08-2011, 12:29 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,811
Blog Entries: 1

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
The "#" usually means that you are root.

But, if you want the environment settings to run, like changing the prompt, then you will need to do:

Code:
su -
Instead.
 
Old 06-08-2011, 01:28 PM   #4
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 136

Original Poster
Rep: Reputation: 20
@TobiSGD,yes i am root,sorry
but @szboardstretcher i did su - but my prompt does not change
but how can i change my prompt?
thank you guys

Last edited by z99; 06-08-2011 at 01:29 PM.
 
Old 06-08-2011, 01:33 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
http://tldp.org/HOWTO/Bash-Prompt-HOWTO/
 
1 members found this post helpful.
Old 06-08-2011, 03:23 PM   #6
roygbiiv
LQ Newbie
 
Registered: May 2011
Distribution: Arch Linux
Posts: 25

Rep: Reputation: 13
Quote:
Originally Posted by z99 View Post
but how can i change my prompt?
thank you guys
Either copy your own ~/.bashrc to /root/ or copy /etc/skel/.bashrc to /root/, and then edit it for your purpose.
 
Old 06-08-2011, 03:44 PM   #7
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
To change your prompt temporarily: PS1=& will change your prompt in &. Also the usual prefix will disappear, giving a command line that only shows the prompt of your choice.
Example:
Code:
root@server:~# PS1=#
#
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal doesn't work properly jaguarm Linux - Software 7 06-05-2010 05:33 PM
DNS lookup doesn't work, ping, firefox will not work properly lovemov Linux - Networking 2 04-23-2009 03:30 PM
Gui doesn't work properly Goudvis Linux - Laptop and Netbook 2 02-27-2009 04:24 PM
Compiz doesn't work properly Pazau Linux - Software 18 12-21-2008 09:33 PM
CP command doesn't work properly? itz2000 Linux - Newbie 1 08-02-2005 02:14 PM


All times are GMT -5. The time now is 07:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration