PS1 color 终端terminal的颜色配置
PS1="[e[92;1m][ue[90;5m@e[25m[e[91;4m]Atlase[24m[e[1m][e[92;1m] W ]\$[e[0m]"
Set
| Code | Description | Example | Preview |
|---|---|---|---|
| 1 | Bold/Bright |
echo -e "Normal e[1mBold"
|
![]() |
| 2 | Dim |
echo -e "Normal e[2mDim"
|
![]() |
| 4 | Underlined |
echo -e "Normal e[4mUnderlined"
|
![]() |
| 5 | Blink 1) |
echo -e "Normal e[5mBlink"
|
![]() |
| 7 | Reverse (invert the foreground and background colors) |
echo -e "Normal e[7minverted"
|
![]() |
| 8 | Hidden (useful for passwords) |
echo -e "Normal e[8mHidden"
|
![]() |
Reset
| Code | Description | Example | Preview |
|---|---|---|---|
| 0 | Reset all attributes |
echo -e "e[0mNormal Text"
|
![]() |
| 21 | Reset bold/bright |
echo -e "Normal e[1mBold e[21mNormal"
|
![]() |
| 22 | Reset dim |
echo -e "Normal e[2mDim e[22mNormal"
|
![]() |
| 24 | Reset underlined |
echo -e "Normal e[4mUnderlined e[24mNormal"
|
![]() |
| 25 | Reset blink |
echo -e "Normal e[5mBlink e[25mNormal"
|
![]() |
| 27 | Reset reverse |
echo -e "Normal e[7minverted e[27mNormal"
|
![]() |
| 28 | Reset hidden |
echo -e "Normal e[8mHidden e[28mNormal"
|
![]() |
Foreground (text)
| Code | Color | Example | Preview |
|---|---|---|---|
| 39 | Default foreground color |
echo -e "Default e[39mDefault" |
![]() |
| 30 | Black |
echo -e "Default e[30mBlack" |
![]() |
| 31 | Red |
echo -e "Default e[31mRed" |
![]() |
| 32 | Green |
echo -e "Default e[32mGreen" |
![]() |
| 33 | Yellow |
echo -e "Default e[33mYellow" |
![]() |
| 34 | Blue |
echo -e "Default e[34mBlue" |
![]() |
| 35 | Magenta |
echo -e "Default e[35mMagenta" |
![]() |
| 36 | Cyan |
echo -e "Default e[36mCyan" |
![]() |
| 37 | Light gray |
echo -e "Default e[37mLight gray" |
![]() |
| 90 | Dark gray |
echo -e "Default e[90mDark gray" |
![]() |
| 91 | Light red |
echo -e "Default e[91mLight red" |
![]() |
| 92 | Light green |
echo -e "Default e[92mLight green" |
![]() |
| 93 | Light yellow |
echo -e "Default e[93mLight yellow" |
![]() |
| 94 | Light blue |
echo -e "Default e[94mLight blue" |
![]() |
| 95 | Light magenta |
echo -e "Default e[95mLight magenta" |
![]() |
| 96 | Light cyan |
echo -e "Default e[96mLight cyan" |
![]() |
| 97 | White |
echo -e "Default e[97mWhite" |
![]() |
Background
| Code | Color | Example | Preview |
|---|---|---|---|
| 49 | Default background color |
echo -e "Default e[49mDefault" |
![]() |
| 40 | Black |
echo -e "Default e[40mBlack" |
![]() |
| 41 | Red |
echo -e "Default e[41mRed" |
![]() |
| 42 | Green |
echo -e "Default e[42mGreen" |
![]() |
| 43 | Yellow |
echo -e "Default e[43mYellow" |
![]() |
| 44 | Blue |
echo -e "Default e[44mBlue" |
![]() |
| 45 | Magenta |
echo -e "Default e[45mMagenta" |
![]() |
| 46 | Cyan |
echo -e "Default e[46mCyan" |
![]() |
| 47 | Light gray |
echo -e "Default e[47mLight gray" |
![]() |
| 100 | Dark gray |
echo -e "Default e[100mDark gray" |
![]() |
| 101 | Light red |
echo -e "Default e[101mLight red" |
![]() |
| 102 | Light green |
echo -e "Default e[102mLight green" |
![]() |
| 103 | Light yellow |
echo -e "Default e[103mLight yellow" |
![]() |
| 104 | Light blue |
echo -e "Default e[104mLight blue" |
![]() |
| 105 | Light magenta |
echo -e "Default e[105mLight magenta" |
![]() |
| 106 | Light cyan |
echo -e "Default e[106mLight cyan" |
![]() |
| 107 | White |
echo -e "Default e[107mWhite" |
![]() |














































