Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just stumbled upon a weird problem. When I SSH into my server (centos, zsh) and I type some stuff and hit backspace It looks like a space - but internally it really deleted the characters.

ls -l a

Note that the space between land a is actually when I hit backspace. When I now hit return ls -a gets executed. This is only in zsh, in bash it works fine.

Hope anyone has an idea what this is all about and how to fix this.

Update: Only happens when using tmux/screen

I also cannot clear the screen:

helium:~% echo $TERM
helium:~% clear
'screen-256color': unknown terminal type.
share|improve this question
up vote 5 down vote accepted

That's unusual. I'd start by seeing whether Ctrl-L works (ie, zsh knows your terminal and can issue a clear-screen) and running echo $TERM to see what terminal type zsh received from; I have send xterm-color and that seems to be portable and accepted.

Another thing to check is what happens when you type Ctrl-H, but I thought that all modern systems had settled on 0x7F for backspace.

[post-update with screen information:]

Bash has more built-in hacks for assuming that missing terminal types are ANSI-ish, but your root problem is that the $TERM is unrecognised. This will break most apps that want to issue control directives to the terminal emulator. Override $TERM in your ~/.zprofile:

case ${TERM} in
  screen-256color) TERM=screen.xterm-xfree86

This is part of the problem of termcap/terminfo -- it relies upon everyone having the same names, everyone being updated, etc. No negotiation is done.

share|improve this answer
Updated my post. This behaviour is only when using tmux/screen. In tmux Ctrl-L does not work properly and Ctrl-H doesn't do a thing. Added some more infos to my intro post. – noxoc Jan 5 '11 at 10:55
Updated my answer, Nils' comment above applies to the first 2 paragraphs of my text. – Phil P Jan 5 '11 at 11:06
in which .zprofile? On my local machine or on the server? :) – noxoc Jan 5 '11 at 11:36
On the server since that's the Linux box with that particular terminfo entry; or in your ~/.zshrc of the local machine you could just override $TERM to something more portable. Or use the term directive inside ~/.screenrc. – Phil P Jan 5 '11 at 11:42
(ahem: the server is the Linux box missing that particular terminfo entry; sorry for any confusion) – Phil P Jan 8 '11 at 23:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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