LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing the terminal string. (https://www.linuxquestions.org/questions/linux-newbie-8/changing-the-terminal-string-172002/)

Mr60s 04-19-2004 07:13 AM

Changing the terminal string.
 
Hello there,

Am new to linux, but I enjoy it more & more every day.
My question regarding the terminal, I was wondering how I could change the "localhost" part to someting else.

Exampel: I want this; [root@localhost /]# to become this; [root@Astring /]#

Any help would be grate, thanks!

TroelsSmit 04-19-2004 07:29 AM

Localhost is set because you have not defined a hostname I guess.

You can change the prompt in the ~/.bashrc file (if using bash):
if [ "$PS1" ]; then
# set a fancy prompt
PS1='\u@\h:\w\$ '
fi

Check 'man bash' for more information and use the '/' button to search.

Mr60s 04-19-2004 07:52 AM

Thanks for your time, that did work very well.
However I was looking for a global affect, something the would affect all the users, without me going around changing every ~/.bashrc files.
Any ideas?

TroelsSmit 04-19-2004 09:21 AM

Do the same thing in /etc/profile :-)

Mr60s 04-20-2004 04:32 AM

Thanks alot, now it works like charm :)


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