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

Readline/bash use the meta key quite often but it only works when I use the Esc-key for it. How can I configure bash/readline to accept a different key as meta?

share|improve this question
This actually has nothing to do with the shell, but rather the terminal emulator. What terminal emulator are you using? (urxvt, gnome-terminal, etc) – Patrick Aug 14 '12 at 12:30
I use xterm and screen. – lelewith Aug 14 '12 at 13:34

This is the same question I asked I while back, so I'm not taking credit for this, but I had to put

xterm*metaSendsEscape: true
URxvt*altSendsEscape: true

in .Xresources to make Alt work as Meta in both xterm and urxvt. It is a bit contradictory, but it works. So experiment with those options. Also, I had to put

xrdb ~/.Xresources

in .xinitrc for it to work.

Edit: My question: Emacs commands in xterm

share|improve this answer

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.