LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   strange command prompt (https://www.linuxquestions.org/questions/linux-newbie-8/strange-command-prompt-42305/)

salparadise 01-21-2003 01:47 PM

strange command prompt
 
i've just changed from Mandrake to RedHat,
I've been using a seperate partition for the home directory and when i fired up RedHat for the first time I had a lot of problems logging in as as user until i moved all the old config files into a temp folder.

I don't know if there's a connection but..

my command prompt is now as follows:

bash-2.05b$

and not [localhost@localdomain]

is this ok? / dangerous? / silly? / inconsequential ?

many ta's

acid_kewpie 01-21-2003 02:00 PM

erm, i guess your ~/.bashrc has not been run, maybe it doesn't exist anymore from whatever you've done. all the default files should be in /etc/skel. there's nothign wrong with what you've got, it's just the default prompt.

bulliver 01-21-2003 02:58 PM

try:

PS1="[\u@\h \W]$ "

That should give you the prompt you are used to. You can check out the bash-prompt mini howto for all sorts of stupid prompt tricks:
http://www.shelluser.net/~giles/bash...wto/book1.html

salparadise 01-21-2003 03:21 PM

ahh
is there anyway to make that command stick so that next time i open the terminal the prompt is the same ?

many thanks

bulliver 01-21-2003 03:28 PM

Well, as acid said its usually in .bashrc, so if it doesn't exist create it in your ed of choice and put in:

PS1="[\u@\h \W]$ "
export PS1

If you have a .bashrc just throw it at the end. If you want this prompt system wide (for all users and root) put it in /etc/bashrc


All times are GMT -5. The time now is 07:53 PM.