View previous topic :: View next topic |
Author |
Message |
tcma Apprentice
Joined: 28 Jun 2004 Posts: 208
|
Posted: Wed Oct 27, 2004 8:28 pm Post subject: bash shell prompt |
|
|
My current bash shell prompt is:
bash-2.05b$
How to change it to:
$ |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20097
|
|
Back to top |
|
|
mhodak Veteran
Joined: 15 Nov 2003 Posts: 1218
|
Posted: Thu Oct 28, 2004 8:16 pm Post subject: |
|
|
Basically, PS1 enviromental variable controls prompt. If you want just $ put into your .bashrc and source it (or relogin). But propmt can be used to display useful information, such as username and current working directory. |
|
Back to top |
|
|
chiatello Guru
Joined: 21 Jul 2003 Posts: 321 Location: knoxvegas, tn, AMERIKA
|
Posted: Thu Oct 28, 2004 10:34 pm Post subject: |
|
|
source /etc/profile, gave me the default one (which is like name@computer dir $) |
|
Back to top |
|
|
enigma_0Z Guru
Joined: 29 Aug 2004 Posts: 531 Location: Either lurking here or at my forum (see sig)
|
Posted: Thu Oct 28, 2004 10:46 pm Post subject: |
|
|
mhodak wrote: | Basically, PS1 enviromental variable controls prompt. If you want just $ put into your .bashrc and source it (or relogin). But propmt can be used to display useful information, such as username and current working directory. |
Actually, if you want the user-related symbol, you would have to escape the dollar sign:
Then, if you are root, you will get the # symbol, and if you are a user, you will get the $ symbol _________________ Check out my...
Website: (CURRENTLY DOWN) http://sledgehammer.ath.cx
Forum: (ALSO CURRRENTLY DOWN) http://sledgehammer.ath.cx/forum/ |
|
Back to top |
|
|
enigma_0Z Guru
Joined: 29 Aug 2004 Posts: 531 Location: Either lurking here or at my forum (see sig)
|
Posted: Thu Oct 28, 2004 10:50 pm Post subject: |
|
|
I also have a bash prompt related question...
In Eterm, my prompt is this:
Code: | username@hostname workingdirectory $ |
And if I change to root, it's still that same prompt (but of course with root@hostname)
Or, if I text login (eg. not GDM or KDM) as root, I get the same.
But, if I start Eterm like this:
Then I get this prompt:
why? and how can I fix it? _________________ Check out my...
Website: (CURRENTLY DOWN) http://sledgehammer.ath.cx
Forum: (ALSO CURRRENTLY DOWN) http://sledgehammer.ath.cx/forum/ |
|
Back to top |
|
|
chiatello Guru
Joined: 21 Jul 2003 Posts: 321 Location: knoxvegas, tn, AMERIKA
|
Posted: Thu Oct 28, 2004 11:43 pm Post subject: |
|
|
have to make it
'su -'
not 'su'
it updates the paths env variables or w/e, same thing as doing source /etc/profile |
|
Back to top |
|
|
mhodak Veteran
Joined: 15 Nov 2003 Posts: 1218
|
Posted: Fri Oct 29, 2004 1:46 am Post subject: |
|
|
enigma_0Z wrote: |
But, if I start Eterm like this:
Then I get this prompt:
why? and how can I fix it? |
DO what chiatello suggested, i.e. add a line into your .bashrc
Code: | source /etc/profile |
AFter this you will have the "username@hostname workingdirectory $" prompt in any terminal. |
|
Back to top |
|
|
|