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 nano 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

Join the Conversation

5 Comments

  1. $ top
    ‘linux’: unknown terminal type.

    $ clear
    ‘linux’: unknown terminal type.

    can you please help me

  2. if I export TERM=xterm

    then i get

    $ clear
    ‘xterm’: unknown terminal type.

    I can see xterminfo at /usr/share..

  3. Came here because of google – fixed my Raspberry-Pi install issue that I traced back to this. Thank-you so much for this :) <3

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.