![tty 控制台的其他背景?](https://linux22.com/image/845953/tty%20%E6%8E%A7%E5%88%B6%E5%8F%B0%E7%9A%84%E5%85%B6%E4%BB%96%E8%83%8C%E6%99%AF%EF%BC%9F.png)
我有~/.bashrc
:
if [ "$TERM" = "linux" ]; then
echo -en "\e]P0232323" #black
echo -en "\e]P82B2B2B" #darkgrey
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P9E33636" #red
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]PA98E34D" #green
echo -en "\e]P3D7AF87" #brown
echo -en "\e]PBFFD75F" #yellow
echo -en "\e]P48787AF" #darkblue
echo -en "\e]PC7373C9" #blue
echo -en "\e]P5BD53A5" #darkmagenta
echo -en "\e]PDD633B2" #magenta
echo -en "\e]P65FAFAF" #darkcyan
echo -en "\e]PE44C9C9" #cyan
echo -en "\e]P7E5E5E5" #lightgrey
echo -en "\e]PFFFFFFF" #white
clear #for background artifacting
fi
我如何选择特定颜色?
答案1
命令“setterm”可用于更改控制台的背景颜色。有许多参数可以更改。尝试以下方法开始:
setterm -background red
clear
然后看看man setterm
还有什么可以玩的。