Results 1 to 7 of 7
How would I go about getting my <username@hostname> to be displayed on the command line in rxvt or xterm? Current is displays:
bash-3.00$
Any information is much appreciated,
~morawski...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-07-2005 #1Just Joined!
- Join Date
- May 2005
- Posts
- 12
Displaying Hostname in rxvt/term
How would I go about getting my <username@hostname> to be displayed on the command line in rxvt or xterm? Current is displays:
bash-3.00$
Any information is much appreciated,
~morawski
- 05-07-2005 #2Linux Engineer
- Join Date
- Apr 2005
- Location
- Buenos Aires, Argentina
- Posts
- 908
Type that in a terminal. If it does work, add it to your ~/.bash_profile, it should work.Code:export PS1='\u@\h:\w\$ '
serzsite.com.ar
"All the drugs in this world won\'t save you from yourself"
- 05-08-2005 #3Just Joined!
- Join Date
- May 2005
- Posts
- 12
Worked like a charm, thanks serz

But uh..this brought something to my attention..I don't have a ~/.bash_profile. or a ~/.profile ..
Why would this be and how can I solve that?
- 05-08-2005 #4Linux Engineer
- Join Date
- Apr 2005
- Location
- Buenos Aires, Argentina
- Posts
- 908
Then create it. The following command create and add what you need to your ~/.bash_profile.
Code:echo "export PS1='\u@\h:\w\$ '" > ~/.bash_profile
serzsite.com.ar
"All the drugs in this world won\'t save you from yourself"
- 05-08-2005 #5Just Joined!
- Join Date
- May 2005
- Posts
- 12
It doesn't seem to work..nothing changed after I rebooted.
Here are the contents of my .bash_profile:
Do I need a shell header? (such as: #! /bin/bash)Code:export PS1='\u@\h:\w\$ ' set -o vi
~morawski
- 05-09-2005 #6Linux Engineer
- Join Date
- Apr 2005
- Location
- Buenos Aires, Argentina
- Posts
- 908
Those shells (rxvt/xterm) must not be reading ~/.bash_profile every time you open them.
Try that.Code:cp ~/.bash_profile ~/.bashrc
serzsite.com.ar
"All the drugs in this world won\'t save you from yourself"
- 05-09-2005 #7Just Joined!
- Join Date
- May 2005
- Posts
- 12
You're a beautiful person, serz.
Originally Posted by serz
Thanks
~morawski


Reply With Quote
