有些颜色在windows上的bash中无法正常呈现?

时间:2016-08-12 18:09:39

标签: bash windows-subsystem-for-linux

我在Windows上使用Uashntu上的Bash。我注意到有些颜色是完全错误的。

运行colortest-256(colortest包)的结果的屏幕截图:

Screenshot of result of running colortest-256 (colortest package).

您可以注意到,在系统颜色中,有几种缺失颜色,颜色立方体完全关闭,灰度渐变仅有3种阴影。这是运行colortest-256的found应该产生的:

screenshot of what colortest-256 should look like

我已将我的TERM设置为xterm-256颜色。我使用全新安装(完全删除了linux子系统并删除了lxss文件夹并重新安装) - 这是我的安装问题还是不支持缺少的颜色?

3 个答案:

答案 0 :(得分:4)

答案 1 :(得分:4)

您很可能正在运行仅支持16种颜色的周年纪念更新。

您可以升级到最近的Windows 10 Insider版本,也可以等到2017年春天到期的Windows 10 Creator更新。

然后你可以这样做:

Windows 10 Insiders Build #14931 introduced 24-bit color support in the Windows Console

enter image description here

答案 2 :(得分:0)

对我来说最简单的解决方案是使用wsltty: https://github.com/mintty/wsltty/releases 它是cygwin的终端,适合在Windows上在Ubuntu上运行bash。

你也可以像Xming一样安装X服务器: https://sourceforge.net/projects/xming/ ,并在其中运行终端。如果你不需要X服务器,可能会太复杂。

相关问题