Bash/Prompt customization

From ArchWiki
Revision as of 01:57, 29 July 2005 by Dlanor (Talk | contribs)

Jump to: navigation, search


There are a variety possibilities for your bash prompt. The following settings are useful for distinguishing the root prompt; it colours the prompt in red:

For regular users:
PS1='~`date +'%H:%M'`~[[\u\~[\033~[00m\]]@\h \W]\$ '

For root:
PS1='~`date +'%H:%M'`~[[\~[\033~[01;31m\]]\u\~[[\033~[00m\]]@\h \W]\$ '

Set the PS1 variable in your ~/.bashrc and export it.

Topic: http://bbs.archlinux.org/viewtopic.php?t=1817