Tim Mattison

Hardcore tech

Tip: Fix "'Xterm': Unknown Terminal Type" Messages in Debian

| Comments

This one has been a bit of a nuisance on newly spooled up Debian instances for me lately. When I try to run “top” or “clear” or really anything that does something with the terminal I get the following message:

'xterm': unknown terminal type.

This is because either you haven’t installed ncurses-term (unlikely) or a symlink from /lib/terminfo/x/xterm to /usr/share/terminfo/x/xterm is missing. To cover all possibilities do this:

sudo apt-get install ncurses-term
sudo ln -s /lib/terminfo/x/xterm /usr/share/terminfo/x/xterm

Poof, your terminal works again!