Every other terminal I've tried has worked fine and has displayed colours and such correctly, but whenever I log in using urxvt I get the following error

tput: unknown terminal "rxvt-unicode-256color"
tput: unknown terminal "rxvt-unicode-256color"
tput: unknown terminal "rxvt-unicode-256color"

Whenever I try to clear I get the following error

'rxvt-unicode-256color': unknown terminal type.

And some programs such as nano won't start at all, giving this error

Error opening terminal: rxvt-unicode-256color.


export TERM=xterm-256color 

I'd guess that rxvt provides a superset of xterm capabilities, so this should be okay, and will be recognized by tput. It only applies to the current shell and its children, so if it causes a problem you can just close it.

If it works you can add it to ~/.profile so you do not have to keep doing it over again -- although note that this requires you log in again and in some contexts may not work, you can check easily with echo $TERM.

  • Thank you, export TERM=xterm-256color fixed it short term, and adding it to .bash_profile rather than .profile fixed it on future logins – MenacingMecha Aug 10 '16 at 16:08


Install the appropriate entry into the terminfo database

According to the ArchLinux Wiki

If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by installing rxvt-unicode-terminfo on the remote host or by copying /usr/share/terminfo/r/rxvt-unicode from your local machine to your host at ~/.terminfo/r/rxvt-unicode; same for rxvt-unicode-256color.

As goldilocks noted in their answer. It is very likely that urxvt has sufficient in common with xterm that it can use an xterm terminfo entry mostly OK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.