Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wacky bash prompt (username@TEXT, dir #)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dvc5
Guru
Guru


Joined: 06 Dec 2003
Posts: 433
Location: Sunnyvale, California

PostPosted: Sun Apr 11, 2004 10:33 pm    Post subject: Wacky bash prompt (username@TEXT, dir #) Reply with quote

As the title shows, for some reason when I logged into my server today, the prompt was extremely weird:

Code:
username@TEXT, / #

And as root it was:
Code:
TEXT, / #


Normally it should be:
Code:
username@hostname / #

and
Code:
root@hostname / #


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
View user's profile Send private message
Vitaliy
Guru
Guru


Joined: 06 Apr 2004
Posts: 451
Location: Brooklyn, NY

PostPosted: Sun Apr 11, 2004 10:44 pm    Post subject: Reply with quote

Edit your /etc/hostname :)
Back to top
View user's profile Send private message
dvc5
Guru
Guru


Joined: 06 Dec 2003
Posts: 433
Location: Sunnyvale, California

PostPosted: Sun Apr 11, 2004 10:53 pm    Post subject: Reply with quote

Vitaliy wrote:
Edit your /etc/hostname :)


Code:
username@TEXT, / $ cat /etc/hostname
loznet
username@TEXT, / $


This is really weird. :roll:
_________________
#define NULL rand() /*heh heh heh */

Green Is Good
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Mon Apr 12, 2004 11:34 am    Post subject: Reply with quote

What's your PS1? and have you tried sourcing /etc/profile?
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
dkaplowitz
Guru
Guru


Joined: 22 Nov 2003
Posts: 596
Location: Philadelphia, PA

PostPosted: Mon Apr 12, 2004 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
dvc5
Guru
Guru


Joined: 06 Dec 2003
Posts: 433
Location: Sunnyvale, California

PostPosted: Mon Apr 12, 2004 4:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum