How to use the command to modify the man pages text color under Linux

  
                

There are a lot of commands under Linux. Some commands are often used, and some commands are almost useless. For example, the command to modify the text color of the man pages. Let's take a closer look with the small series.

Linux has a lot of complicated commands, but there are some simple but not very useful commands, but these little commands are not well known to most people. Here, just let these tips add to the game. For the fun of working in the dimension, the default man pages have only one color, and some of the text is bold.

Just execute the following command.

The code is as follows:

cat "\\EOF" /etc/bashrc

man() {

env \\

LESS_TERMCAP_mb=$(printf “\\e[1;31m”) \\

LESS_TERMCAP_md=$(printf “\\e[1;31m”) \\

LESS_TERMCAP_me=$(printf &ldquo ;\\e[0m”) \\

LESS_TERMCAP_se=$(printf “\\e[0m”) \\

LESS_TERMCAP_so=$(printf “\\e[1;44;33m” ) <

LESS_TERMCAP_ue=$(printf “\\e[0m”) \\

LESS_TERMCAP_us=$(printf “\\e[1;32m”) \\

Man “$@”

}

EOF

. /Etc /bashrc

Here is the end of the execution of the above code results

The above is a change of text color man pages under Linux commands introduced, although the practicality of this command is not high But occasionally changing colors to change mood is also a good choice.

Copyright © Windows knowledge All Rights Reserved