'xterm-256color': unknown terminal type.

After upgrading to OSX Lion, I started getting this error on certain (Debian/Ubuntu) servers. The fix is simply to install the “ncurses-term” package which provides the file {{{/usr/share/terminfo/x/xterm-256color}}}.


  1. O says:

    Works like a charm! Thank you.

    Running “sudo apt-get install ncurses-term” on my ubuntu machine solved my problem.

  2. D says:

    Thanks for sharing–helped me as well! Thanks “O” for adding a few details as well.

  3. Clint says:

    Works on CentOS too, much thanks.

  4. Jon Zobrist says:

    Thanks tons, worked perfectly!

  5. Zoltan says:

    Running “sudo apt-get install ncurses-term” on my ubuntu machine solved my problem too. Thanks!


  6. Daniel says:

    Thank you. That was getting quite annoying.

  7. Cristobal says:

    Thanks a lot :)
    Been bugging me a while now…

  8. JV says:

    Great Info! Is there a workaround that I can do from my Mac’s terminal client? I log into 100+ servers where I don’t have root access and installing anything requires lots of change control.

  9. JV says:

    Nevermind, I found it.

    In preferences I changed “declare terminal as” to xterm-color instead of the 256 option.

  10. Mike says:

    Like a charm, thank you.

  11. Francisco Perfectti says:

    Works in ubuntu 8.04. Thanks.
    A workaround is to start a xterm in OSX and connect to the linux server from it. At least it works for me.

  12. Chris Snyder says:

    Ran into this on an unsupported Linux server (no way to install new packages).

    But I don’t care about color, so the simple fix was:

    cd /usr/share/terminfo/x/
    ln -s xterm-mono xterm-256color

    Won’t work for everyone, but will work for others who don’t need/want color.

  13. Antonio says:

    Worked like a charm!
    Thanks :)

  14. Thanks. I was able to fix it for my use case (OS X Lion connecting to sdf.org) by changing under Terminal Preferences > Advanced > Emulation: Declare terminal as.

Leave a Reply

Your email address will not be published. Required fields are marked *