Difference between revisions of "Bash/Prompt customization"

From ArchWiki
Jump to: navigation, search
Line 16: Line 16:
<b>Topic:</b> http://bbs.archlinux.org/viewtopic.php?t=1817
<b>Topic:</b> http://bbs.archlinux.org/viewtopic.php?t=1817
By the way, there are also some good bash-prompts available for download at http://www.themedepot.org/

Revision as of 01:57, 29 July 2005

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