Ubuntu – Making bash prompt bold

bashbashrccommand linecustomization

My $PS1 variable is

\[\033[36m\][\[\033[m\]\[\033[34m\]\u@\h\[\033[m\] \[\033[32m\]\W\[\033[m\]\[\033[36m\]]\[\033[m\] $

I wish to maintain the same colors and text but make the prompt appear in bold. How do I accomplish this?

I looked over the web and found this can be done using tput bold, but the prompt appeared broken to me, I must be doing it wrong.

Best Answer

Bold is set by 01 so you need to add 01; before each color specification:

\[\033[01;36m\][\[\033[m\]\[\033[01;34m\]\u@\h\[\033[m\] \[\033[01;32m\]\W\[\033[m\]\[\033[01;36m\]]\[\033[m\] $