View previous topic :: View next topic |
Author |
Message |
dvc5 Guru
Joined: 06 Dec 2003 Posts: 433 Location: Sunnyvale, California
|
Posted: Sun Apr 11, 2004 10:33 pm Post subject: Wacky bash prompt (username@TEXT, dir #) |
|
|
As the title shows, for some reason when I logged into my server today, the prompt was extremely weird:
And as root it was:
Normally it should be:
Code: | username@hostname / # |
and
My bash prompt is just the default gentoo setup one so I can't imagine what it could be. Maybe my hostname not resolving properly? Thanks in advance if anyone can help. _________________ #define NULL rand() /*heh heh heh */
Green Is Good |
|
Back to top |
|
|
Vitaliy Guru
Joined: 06 Apr 2004 Posts: 451 Location: Brooklyn, NY
|
Posted: Sun Apr 11, 2004 10:44 pm Post subject: |
|
|
Edit your /etc/hostname |
|
Back to top |
|
|
dvc5 Guru
Joined: 06 Dec 2003 Posts: 433 Location: Sunnyvale, California
|
Posted: Sun Apr 11, 2004 10:53 pm Post subject: |
|
|
Vitaliy wrote: | Edit your /etc/hostname |
Code: | username@TEXT, / $ cat /etc/hostname
loznet
username@TEXT, / $ |
This is really weird. _________________ #define NULL rand() /*heh heh heh */
Green Is Good |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Mon Apr 12, 2004 11:34 am Post subject: |
|
|
What's your PS1? and have you tried sourcing /etc/profile? _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
dkaplowitz Guru
Joined: 22 Nov 2003 Posts: 596 Location: Philadelphia, PA
|
Posted: Mon Apr 12, 2004 11:57 am Post subject: |
|
|
For colored, try this in your ~/.bash_profile: Code: | export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] ' |
or this, no colors:
Code: |
export PS1='\u@\h:\w\$ '
|
_________________ http://dkap.info |
|
Back to top |
|
|
dvc5 Guru
Joined: 06 Dec 2003 Posts: 433 Location: Sunnyvale, California
|
Posted: Mon Apr 12, 2004 4:08 pm Post subject: |
|
|
tomk wrote: | What's your PS1? and have you tried sourcing /etc/profile? |
dkaplowitz wrote: | For colored, try this in your ~/.bash_profile:
Code:
export PS1='\[\e[32m\]\u@\h/\[\e[1;31m\]\w\[\e[1;34m\]\$\[\e[0m\] '
or this, no colors:
Code:
export PS1='\u@\h:\w\$ ' |
Thanks for the responses, the problem just solved itself when I rebooted my laptop. So I have no idea what on my laptop could have caused the prompt on my server to be screwy. I think it might have had to do with my laptop not properly resolving the server's hostname? Not really sure, at least I think I can rule out that the box was compromised. _________________ #define NULL rand() /*heh heh heh */
Green Is Good |
|
Back to top |
|
|
|