Resolving “‘unknown’: unknown terminal type.” error

Last day, after updating the repositories and installing the updated packages on my Debian Lenny, I found that I could no longer run top or use nan or vi to open a file. It threw up this nasty error:

#top
'unknown': unknown terminal type.

After a bit of sleuthing, I came to the conclusion that my default console terminal type was defined as ‘unknown’, which, obviously, isn’t correct. To display your default terminal type, use this :

echo $TERM

If it says something other than linux, there is your problem.

To change it to linux, just type in:

export TERM=linux

To make the change permanent:

echo 'export TERM=linux' >> ~/.bash_profile

Related posts:

  1. Nginx: Resolving “No input file specified” error
  2. Removing individual entries from the auto-complete list

One Comment

  1. CanaDave says:

    Thanks!…this worked for me.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>