终端terminal的颜色配置

PS1 color  终端terminal的颜色配置

PS1="\[\e[92;1m\][\u\e[90;5m@\e[25m\[\e[91;4m\]Atlas\e[24m\[\e[1m\]\[\e[92;1m\] \W ]\\$\[\e[0m\]"

export PS1="\[\033[38;5;87m\]\u\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;119m\]Atlas:\[$(tput sgr0)\]\[\033[38;5;81m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]\[\033[38;5;2m\]✔️\[$(tput sgr0)\]\[\033[38;5;118m\]\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]"
export PS1="\[\033[92;1m\]\u\[$(tput bold)\]\[$(tput sgr0)\]\[\033[90;5m\]@\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[91;4m\]10.155.122.199:\[$(tput sgr0)\]\[\033[92;1m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]\[\033[38;5;2m\]✔️\[$(tput sgr0)\]\[\033[38;5;118m\]\[$(tput sgr0)\]\[\033[38;5;15m\]\\$ \[$(tput sgr0)\]"

Set

 

CodeDescriptionExamplePreview
1 Bold/Bright
echo -e "Normal \e[1mBold"
Normal Bold
2 Dim
echo -e "Normal \e[2mDim"
Normal Dim
4 Underlined
echo -e "Normal \e[4mUnderlined"
Normal Underlined
5 Blink 1)
echo -e "Normal \e[5mBlink"
Normal Blink
7 Reverse (invert the foreground and background colors)
echo -e "Normal \e[7minverted"
Normal inverted
8 Hidden (useful for passwords)
echo -e "Normal \e[8mHidden"
Normal Hidden

 

 

 

 

 

 

 

Reset

CodeDescriptionExamplePreview
0 Reset all attributes
echo -e "\e[0mNormal Text"
Normal Text
21 Reset bold/bright
echo -e "Normal \e[1mBold \e[21mNormal"
Normal Bold Normal
22 Reset dim
echo -e "Normal \e[2mDim \e[22mNormal"
Normal Dim Normal
24 Reset underlined
echo -e "Normal \e[4mUnderlined \e[24mNormal"
Normal Underlined Normal
25 Reset blink
echo -e "Normal \e[5mBlink \e[25mNormal"
Normal Blink Normal
27 Reset reverse
echo -e "Normal \e[7minverted \e[27mNormal"
Normal inverted Normal
28 Reset hidden
echo -e "Normal \e[8mHidden \e[28mNormal"
Normal Hidden Normal

Foreground (text)

CodeColorExamplePreview
39 Default foreground color
echo -e "Default \e[39mDefault"
Default Default
30 Black
echo -e "Default \e[30mBlack"
Default Black
31 Red
echo -e "Default \e[31mRed"
Default Red
32 Green
echo -e "Default \e[32mGreen"
Default Green
33 Yellow
echo -e "Default \e[33mYellow"
Default Yellow
34 Blue
echo -e "Default \e[34mBlue"
Default Blue
35 Magenta
echo -e "Default \e[35mMagenta"
Default Magenta
36 Cyan
echo -e "Default \e[36mCyan"
Default Cyan
37 Light gray
echo -e "Default \e[37mLight gray"
Default Light gray
90 Dark gray
echo -e "Default \e[90mDark gray"
Default Dark gray
91 Light red
echo -e "Default \e[91mLight red"
Default Light red
92 Light green
echo -e "Default \e[92mLight green"
Default Light green
93 Light yellow
echo -e "Default \e[93mLight yellow"
Default Light yellow
94 Light blue
echo -e "Default \e[94mLight blue"
Default Light blue
95 Light magenta
echo -e "Default \e[95mLight magenta"
Default Light magenta
96 Light cyan
echo -e "Default \e[96mLight cyan"
Default Light cyan
97 White
echo -e "Default \e[97mWhite"
Default White

Background

CodeColorExamplePreview
49 Default background color
echo -e "Default \e[49mDefault"
Default Default
40 Black
echo -e "Default \e[40mBlack"
Default Black
41 Red
echo -e "Default \e[41mRed"
Default Red
42 Green
echo -e "Default \e[42mGreen"
Default Green
43 Yellow
echo -e "Default \e[43mYellow"
Default Yellow
44 Blue
echo -e "Default \e[44mBlue"
Default Blue
45 Magenta
echo -e "Default \e[45mMagenta"
Default Magenta
46 Cyan
echo -e "Default \e[46mCyan"
Default Cyan
47 Light gray
echo -e "Default \e[47mLight gray"
Default Light gray
100 Dark gray
echo -e "Default \e[100mDark gray"
Default Dark gray
101 Light red
echo -e "Default \e[101mLight red"
Default Light red
102 Light green
echo -e "Default \e[102mLight green"
Default Light green
103 Light yellow
echo -e "Default \e[103mLight yellow"
Default Light yellow
104 Light blue
echo -e "Default \e[104mLight blue"
Default Light blue
105 Light magenta
echo -e "Default \e[105mLight magenta"
Default Light magenta
106 Light cyan
echo -e "Default \e[106mLight cyan"
Default Light cyan
107 White
echo -e "Default \e[107mWhite"
Default White
 

 

 
posted @ 2018-10-23 15:41  O1dCat  阅读(1667)  评论(0编辑  收藏  举报