Server Fault is a question and answer site for system and network administrators. 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

Over the years I've had various keymap issues in UNIX screen through SSH, and I assume others have as well. My question has two parts:

  • When I SSH into my Ubuntu Dapper server (I know, I'm moving to Lenny post-haste:) from my OSX Macbook, the delete key doesn't map to backspace, but to delete (which is not the correct behavior, Apple's delete is really backspace). Has anyone else encountered this behavior? How to resolve it?
  • I think I ought to know more about how keymaps work on the UNIX console in general. Where can I find general information on how to resolve inter-platform keymap issues with SSH?
share|improve this question
  1. Check in Terminal -> Settings -> Advanced and make sure that your delete key is sending something sane. Toggle this and see if it helps.
  2. See what $TERM is when you ssh into your server. I get xterm-color when I ssh in to my Debian box, and screen when I'm in screen.
share|improve this answer

Ubuntu Linux, and UNIX systems in general, use a program called stty to configure the keyboard. Run the command "man stty" to read the manual page for stty. By the way, stty is in section 1 of the manual, so UNIX geeks tend to call this program "stty(1)".

The usual way to customize keyboards is to edit the startup file for your shell. If you use the bash shell, this file is .bashrc. You can test a shell variable called "TERM" which identifies what kind of terminal or terminal emulator you are using. If you have no experience at editing .bashrc files, you can read about the syntax in the bash manual page: "man bash"

As far as I know, the actual key code sent by the Apple terminal emulator probably is ASCII DEL; it's up to your stty settings to turn that into backspace-erase in the shell.

Good luck!

share|improve this answer

You need to make yourself an .inputrc file in your home directory. Check out:

My ~/.inputrc looks like this (I especially like the case-insensitive auto complete):

# Make fwd delete key do something useful
"\e[3~": delete-char

# Make ctrl-left and ctrl-right skip words
"\e[5C": forward-word
"\e[5D": backward-word

# ignore case in tab-autocomplete
set completion-ignore-case On
share|improve this answer
How about this gem: set show-all-if-ambiguous on set completion-query-items 150 If there are less than 150 possible tab completions, show them all on the first tab. =) – Sam Halicke Oct 26 '09 at 4:57

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.