error opening terminal: xterm-256color

I logged into metasploitable from kali linux using SSH.(Windows host)

Now I want to access file named (/var/www/mutillidae/ in metasploitable.

I tried opening it using sudo nano /var/www/mutillidae/ command and it showed me an error.

error opening terminal: xterm-256color

  • How to overcome this error?
  • Is there any problem as I opened it using SSH?
Asked By: Maverick_284


It seems like you have a problem with the terminal definition.

Try using xterm instead of xterm-256color

export TERM=xterm

or the following terminal setting:

export TERMINFO=/etc/terminfo
export TERM=linux

Also, if you still have problem with nano try using vi which is a simple editor and doesn’t required much from the terminal

sudo vi /var/www/mutillidae/
Answered By: Yaron
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.