Color man pages in Linux

By | December 11, 2008

If you had enough of the default look of your man pages, set less as your default man page reader and insert these lines in your ~/.bashrc file:

export LESS_TERMCAP_mb=$’\E[01;31m’
export LESS_TERMCAP_md=$’\E[01;37m’
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’

4 thoughts on “Color man pages in Linux

  1. Pingback: Color man pages in Linux | Linux-Trickz

  2. Pingback: Add Colors to Your Manpages | AmirWatad.com

  3. delvalle26

    Thank you for this snippet.

    I had a little trouble when pasting this into my ~/.bashrc
    The single quote should not be a right single quote.

    Specifically, change ’ to ‘

    Reply
  4. delvalle26

    I apologize for the second post, but seeing mine awaiting moderation, it also ruined the single quote…

    For a tips site it would be nice to disable anything that changes characters in syntax…

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *