How do you display xterm colors with putty/bash?
For me, I had to go into settings and set the terminal type. Settings -> Connection > Data > Terminal-type change to xterm-256color
.
According to the PuTTY user manual this should be enabled by default:
If you have an application which is supposed to use 256-colour mode and it isn't working, you may find you need to tell your server that your terminal supports 256 colours. On Unix, you do this by ensuring that the setting of TERM describes a 256-colour-capable terminal. You can check this using a command such asinfocmp
:If you do not see$ infocmp | grep colors colors#256, cols#80, it#8, lines#24, pairs#256,
colors#256
in the output, you may need to change your terminal setting. On modern Linux machines, you could tryxterm-256color
.
If you are looking to use 256 colours in a specific application, like Vim or Emacs, there are separate guides for how to achieve that:
- Vim: http://vim.wikia.com/wiki/Using_vim_color_schemes_with_Putty
- Emacs: http://www.emacswiki.org/emacs/PuTTY#toc2
Click on the System menu at the upper left corner of the PuTTY window.
Select Change Settings > Window > Colours. In the box that says "Select a colour to adjust", choose ANSI Blue and click the Modify Button. Slide the black arrow on the right up until you see a lighter shade of blue that you like. Click OK. Perform the same steps for ANSI Blue Bold so you can have a perceptible difference between the two. When you're finished, click Apply.