Pretty Bash Prompt

Posted by Mr PHP on

Add this to your ~/.bash_profile to get a pretty prompt.

example 1

export PS1='\n\[\e[31;22m\]\d \t\e[32;0m\n\[email protected]\[\e[32;0m\]\H:\w>'

EG:

Fri Nov 07 09:26:20
[email protected]:/path>

example 2

export PS1="\[\033[1;31m\][\t]\[\033[1;34m\][\[email protected]\H:\w]#\[\033[0;37m\] "

EG:

[10:43:59][[email protected]:/path]#

Tagged with : Linux


Comments