Add Color To Man Pages

This will make the man pages colorful and (probably) easier to follow.

Add this to bashrc


export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;34m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

Now try it

man printf

If you still don’t see colors, add this to bash_alias

alias man=’man -P less’

Now it should work.

Enjoy.

Leave a Reply