.syntaxhighlighter.sh-confluence { background-color: #F1F2F4 !important; } |
I'd like to see MAN pages in color, but they are only appearing in black and white.
The man program uses the PAGER program to handle the MAN page's results. Typically, the utilized PAGER is 'less' or 'more.' Both 'less' and 'more' do not handle outputs in color. Therefore, many MAN pages are printed in black and white.
To see MAN pages in color, you'll need to change the MAN code to a value that can be expressed in color. To do this, you can either:
export LESS_TERMCAP_mb=$'\e[1;32m' # begin blinking export LESS_TERMCAP_md=$'\e[1;32m' # begin bold export LESS_TERMCAP_me=$'\e[0m' # end mode export LESS_TERMCAP_se=$'\e[0m' # end standout-mode export LESS_TERMCAP_so=$'\e[01;33m' # begin standout-mode export LESS_TERMCAP_ue=$'\e[0m' # end underline export LESS_TERMCAP_us=$'\e[1;4;31m' # begin underline |
The color representation in the code example above is as follows:
The other terminal code in the above example is as follows:
For a more detailed explanation, refer to the terminal code manual.
# apt install most # Debian/Ubuntu # yum install most # RHEL / CentOS, Fedora # dnf install most # Recent RHEL, CentOS, Fedora |
$ export PAGER=/usr/bin/most $ man cp |
$ gunzip -c $MANPATH/man1/cp.1.gz | man2html - | lynx -stdin |