Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At my job, I ssh into a development server everyday. I usually use exceed XStart to ssh in, but I downloaded PuTTY to see if I could do anything that I couldn't do with XStart.

I spend almost the entire day looking at the regular white background/black text terminal. The TERM variable in the server is set to vt100, and as far as I know, it's an eight-color display.

I was wondering if there was a way to have PuTTY emulate a 256 color terminal. I would really like some syntax highlighting in Vim, and the built-in ones are just awful. I've tried vim -T xterm-256color, and that only seems to let me use the default color schemes.

I also tried setting t_Co=256, but that doesn't work either.

If it helps, the dev server is a Red Hat 6 box.

share|improve this question

1. Configure Putty

In Settings > Windows > Colours there is a check box for "Allow terminal to use xterm 256-colour mode".

2. Let the app know

You'll probably have to change Settings -> Connection > Data > Terminal-type string to:


See also

share|improve this answer
I have just verified that I can get 256 colors in Vim with PuTTY when that option is enabled. PuTTY seems to set the TERM to "xterm" automatically for me; you may still need to manually do ":set t_Co=256" within Vim. – Heptite Jun 14 '12 at 17:48
I tried the Allow xterm 256-color mode, and that hasn't done anything. I also changed the terminal string to xterm-color, that also did nothing. – Tom Jun 14 '12 at 19:54
@Tom the terminal should be xterm-256color – bahamat Jun 14 '12 at 21:46
@bahamat: good catch, I'll update the answer. – RedGrittyBrick Jun 15 '12 at 0:10
@Tom: All other systems that I've used use xterm-256color. If putty doesn't do anything with that I'm not sure anything else can be done. Check this page: and try the script to determine for sure wether or not it's working. – bahamat Jun 15 '12 at 18:10

I recommend the putty-256color terminal type instead of xterm-256color, if the system you're logging in to includes the appropriate terminfo file (or if you have permissions to install the terminfo file there). The putty/putty-256color TERM has better support for some keys (e.g. F1-F4).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.