Jul 24, 2003 #1 Mowatt IS-IT--Management Jul 22, 2003 16 GB How can I make all the user prompt's display the the server name and the user name's. thanx mowatt
Jul 24, 2003 1 #2 bi Technical User Apr 13, 2001 1,552 US Put this in /etc/profile: HOST=`/usr/bin/uname-n` LOGNAME=`/usr/bin/logname` export HOST LOGNAME PS1='$LOGNAME@$HOST: $PWD >' export PS1 The first two lines use the backtick quote. The fourth line uses the regular quotes. Also, I added : $PWD to this so you will know which directory you are in. Upvote 0 Downvote
Put this in /etc/profile: HOST=`/usr/bin/uname-n` LOGNAME=`/usr/bin/logname` export HOST LOGNAME PS1='$LOGNAME@$HOST: $PWD >' export PS1 The first two lines use the backtick quote. The fourth line uses the regular quotes. Also, I added : $PWD to this so you will know which directory you are in.
Jul 24, 2003 #3 bi Technical User Apr 13, 2001 1,552 US Oop. The first line should be: HOST=`/usr/bin/uname -n` Upvote 0 Downvote
Jul 24, 2003 #4 AHinMaine ISP Nov 27, 2002 264 US Or if you you use tcsh: you can use something like: Code: set prompt="%S(%h)%s[%B%n%b@%M] [%~] %B%#%b " It will give you something like this: Code: (158)[user@host] [/tmp] > And it also properly changes the > to a # when you become super user. -- Andy http://www.nachoz.com Upvote 0 Downvote
Or if you you use tcsh: you can use something like: Code: set prompt="%S(%h)%s[%B%n%b@%M] [%~] %B%#%b " It will give you something like this: Code: (158)[user@host] [/tmp] > And it also properly changes the > to a # when you become super user. -- Andy http://www.nachoz.com