终端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\]"

Set

 

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

 

 

 

 

 

 

 

Reset

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

Foreground (text)

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

Background

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

 

 

转载于:https://www.cnblogs.com/chinesezyc/p/9837008.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值