Use echo in shell to print the color font and background
It's fun to print the terminal in shell!
First, we know that echo printf is usually used in shell terminal printing;
Note: font color reset = 0, black = 30, Red = 31, Green = 32, *** = 33, Blue = 34, Magenta = 35, cyan = 36, white = 37.
Background Color reset = 0, black = 40, Red = 41, Green = 42, *** = 43, Blue = 44, Magenta = 45, cyan = 46, white = 47.
To print the color text, enter the following command:
# Echo-e "\ e [1; 36 m \ e [0 m"
Set \ e [1; 36 to cyan \ e [0 to reset the color. 4 if you want other colors, you only need to replace 36 with numbers corresponding to other colors;
To set a color background, enter the following command:
# Echo-e "\ e [1; 41 m \ e [0 m"
Study the rest by yourself!
Ubuntu 14.04 right-click Terminal settings
Linux multi-window split-screen terminal -- Terminator
How to modify the logon color of an ssh command line
Use the ls command in Ubuntu to display and modify the file color.
This article permanently updates the link address: