Add Colours to Man Pages

Sometimes you come across something new, and you just know your life will never be the same again! This is just how I felt when I came across an article on how to add colouring to Linux man pages just by adding some lines to the .bashrc file.

The Easy Server Monitor is a fantastic single PHP page for providing useful stats on your server, and its author is a developer by the name of ShevAbam. While browsing his site I saw an article about adding colouring to Linux man pages, and had to try it out.

You will most likely be very familiar with the man pages and the essential role they play in detailing the use and options of the various commands on Linux systems. You will also be familiar with how bland and mundane they look.

To add colouring to the pages, edit your ~/.bashrc file (using vi or nano) and add the following lines to the end of the file, and then save and exit:

export LESS_TERMCAP_mb=$’\e[1;32m’
export LESS_TERMCAP_md=$’\e[1;32m’
export LESS_TERMCAP_me=$’\e[0m’
export LESS_TERMCAP_se=$’\e[0m’
export LESS_TERMCAP_so=$’\e[01;33m’
export LESS_TERMCAP_ue=$’\e[0m’
export LESS_TERMCAP_us=$’\e[1;4;31m’

Then run ‘source ~/.bashrc‘ for the changes to take effect. The difference it makes is very impressive!

ShevAbams page goes into more detail about the variable LESS_TERMCAP and points to another page which goes into more detail on the variety of colours you can choose from.

Check out for more details