Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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 have a clean installation of openSuse. This automatically sets up bash as the default shell.

For historic reasons, all of the aliases and shortcuts I want to port from an old computer are in tcsh, and I don't really feel up to learning how to do the same in bash. Instead, I changed the login shell to tcsh, and I'm happy.

The problem I have now is that backspace only deletes forward (like the del key), instead of backward (like ctrl+h). How can I bind the backspace key to delete backwards instead of forward?

share|improve this question
up vote 2 down vote accepted

The shell command to change key bindings is bindkey, Backspace presumably sends byte 127 (^?; check by typing Ctrl+V then Backspace), and the edition command to delete a character backwards is backward-delete-char. So put this in your ~/.tcshrc:

bindkey '^?' backward-delete-char
share|improve this answer
# stty erase <press backspace key>
share|improve this answer
This doesn't actually work. – Nathan Fellman Mar 28 '12 at 22:06

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.