Ubuntu Bash的颜色 - 如何禁用颜色&改为单色?

时间:2017-08-25 16:09:02

标签: azure azure-cli azure-cli2

我在安装了Bash的Ubuntu Linux时使用Win10。

我无法阅读BASH多种颜色,并希望将其切换为单色(2种颜色)以便于阅读。

我尝试了Google搜索,无法找到Ubuntu Bash命令行。

enter image description here

1 个答案:

答案 0 :(得分:0)

如果您只想使用两种颜色,我们可以在~/.bashrc添加三行来实现这一目标。 我们在~/.bashrc的末尾添加了三行,如下所示:

$vi ~/.bashrc
rt LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'

添加完成后,我们退出此bash进行刷新,然后登录此bash,这是我的结果: enter image description here

此外,如果您想设置其他颜色,我们可以按照此link进行操作。

以下是关于您的类似案例,请参阅it

<强>更新

我们可以使用CMD打开ubuntu bash,如下所示:

enter image description here