Re: command prompt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 Nov 2004 09:03:15 -0600, you wrote:

>If you just want your shell prompt to be what it used to be, issue 
>
>export PS1="[\u@\h \W]\$"
>
>PS1 is the prompt variable...
>


I put this one together a few years ago and I really like it.  It makes the
prompt red when you're root and green if you're a regular user.  Handy when
you're jumping back and forth.  Stick it at the end of /etc/bashrc

if [ `id -un` = root ]; then

PS1='\[\033[1;32m[\033[1;35m\]\u@\h\W\[\033[1;32m]\033[1;32m\]\$\[\033[1;0m\]'
 else

PS1='\[\033[1;32m[\033[1;36m\]\u@\h\W\[\033[1;32m]\033[1;32m\]\$\[\033[1;0m\]'
fi


Home dir prompt will look like this: 

[fpineau@snafu ~]$   

(plus color, of course)


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux