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

I've been battling it out with this 256-colour terminal malarkey and I just can't get decent colour displays in a terminal. I'm using ubuntu-server with openssh and zsh. I have tried accessing the machine from both Windows (Putty) and RHEL (gnome-terminal) and neither of them displays the colours properly.

I double checked that:

  • $TERM is set to xterm-256color
  • There is a file present in /lib/terminfo/x/xterm-256color

Whenever I use a vim or oh-my-zsh theme, the colours are all ANSI based. What am I missing?

EDIT: Oh I should also say that when i do

echo "$FG[214]Blah"

Then it displays using 256 colours. Neither the prompt nor vim displays the colours I expect.

share|improve this question
Which terminal are you using on RHEL? zsh is only a shell, it doesn't have anything to do with colours. – grawity Jan 5 '12 at 16:15
Sorry, I edited the post to be more accurate – jabalsad Jan 5 '12 at 16:19
Besides setting TERM to xterm-256color various programs may require additional configuration to tell them to take advantage of the extended color palette. What terminfo file does the infocmp command say you’re using? – Chris Page Jan 5 '12 at 20:42
infocmp says 'colors#8'... – jabalsad Jan 5 '12 at 21:54
Was this ever figured out? – Kian Mar 15 '14 at 18:05

Try setting COLORTERM on the server.

In my case (ubuntu gnome-terminal to ubuntu server), adding this to ~/.bashrc solved it:

export COLORTERM=gnome-terminal

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.