Prettify your shell prompt

August 05, 2006

I've used the same shell prompt for ~10 years now. 10 years. The colors I use come from an old IRC friend's bash configuration utility (I probably have the script source buried deep in some archives somewhere).

You'll notice that the prompt tells you the current user's username, the hostname of the machine, and the current folder.

shell prompt

If you'd like something similar, simply place the following line in the .bashrc file of your home directory.

PS1="[\033[1;30m][[\033[1;36m]
\u[\033[0;36m]@[\033[1;36m]
\h[\033[1;30m]][\033[0;36m]:[\033[1;36m]:[\033[0;37m]
\W[\03[1;36m>[\033[0m] "

Realize that it should all be a single line (I broke it here so that it would fit nicely and be a bit easier to read).

You should follow me on Twitter here