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

I have no idea why, but on my EC2 instances which are running Ubuntu 10.04 the ALT key shortcuts are not working and instead question marks are showing instead.

E.g. ALT+f for moving forward a word doesn't work...

In case it matters:

$ echo $TERM
share|improve this question
What terminal emulator are you using? If you press Ctrl-v then Alt-f, what do you see? What is output when you do Ctrl-x Ctrl-v? – Dennis Williamson Mar 14 '11 at 14:17
Ctrl-v Alt-f outputs nothing. Xtrl-x Ctrl-v outputs: GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) – abyx Mar 14 '11 at 15:55
up vote 1 down vote accepted

Turns out this is an iTerm/iTerm2 issue. For some reason the default for the option key behavior, which is to act as 'meta', worked well for me on any other SSH session, but on the EC2 servers it produced the noted behavior.

Once I realized this is an iTerm2 used it FAQ to solve this: Under Preferences->Profiles select the relevant profile, and switch to the 'Keyboard' tab. At the bottom set both option keys to send escape codes (act as +Esc). This solved my issue with no regressions on other SSH sessions.

Thanks Dennis & Jake!

share|improve this answer

Sounds like keyboard layout... sudo dpkg-reconfigure console-setup is the command the link mentions.

share|improve this answer
I tried it, simply entering the defaults which seem to me like they should work changed nothing (I work with the OP). – abyx Mar 14 '11 at 15:56

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.