How to get colors in man command page

This post was written by admin on December 26, 2009
Posted Under: General

We used to type man to find out forgotten parameter of special command.However,there’s only single color in the long output of man command and we need to take a hard look at on it.Here we can try to get colors in man page by edit .bashrc file.
Open .bashrc with your favourite editor:

gedit ~/.bashrc

add following into the end:

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

Finally,use the command to apply this change:

source .bashrc

Now,try to man something!

Related posts:

  1. How to show date and time in your ubuntu bash history
  2. Customize your own Gnome desktop colors with Gnome color chooser
  3. Instant LAN File Sharing with one command in Ubuntu
  4. Execute sudo command without asking for password
  5. How to take Screenshot Image of Entire web page in Firefox

    Reader Comments

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address