A few bash prompts

Flashing Red prompt for root:

export PS1='\[\e[5;31m\][\u@\h \W]\$\[\e[0m\]'

Red, underlined prompt:

export PS1='\[\e[4;31m\][\u@\h \W]\$\[\e[0m\]'

Normal red prompt:

export PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\]'

Blue prompt:

\[\e[1;34m\][\u@\h \W]\$\[\e[0m\]

In short, the available highlighting options are:

Sequence What it does
ESC[1m Bold, intensify foreground
ESC[4m Underscore
ESC[5m Blink
ESC[7m Reverse video
ESC[0m All attributes off



You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.