After a few days of operation on my new ec2 build, the following happens:

  1. I log into SSH, everything is fine, I do my coding
  2. I return the next day, and log into SSH
  3. I cannot type a lower cased e anymore--I get the error ding when I type it
  4. I try to ssh from a different computer, same problem
  5. I reboot the server, same problem
  6. I open nano or vi and e works fine, just not in bash or sh
  7. I terminate the server, create a new one, install from scratch, a few days later it happens again

This is baffling! Where do I even start to troubleshoot?

My Local Machine Setup(s):

  • windows XP or 7
  • putty (latest) or cygwin/openssh

The EC2 setup

Output of stty -a while I can't type an e

sh-4.1$ stty -a
speed 38400 baud; rows 30; columns 95; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany
-imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

In case it helps someone else with a similar issue, I created a script (called sub) to convert upper-cased E to lower-cased, then echo the command back. Then I run it in backticks to get an e on the command line::

echo ${@//E/e}

> `sub Emacs /Etc/profilE`


  1. This breaks for all users
  2. In bash only (csh works fine)
  3. In emacs edit mode only

I've created a chat room to discuss this issue and hone in the solution.

  • 1
    post the output of stty -a on the ec2 server when it goes wonky – MikeyB Nov 29 '11 at 18:03
  • 1
    Is there anything funny in /etc/profile, ~/.profile or ~/.bashrc ? Can you su to another user and try it? It seems either that or maybe your keyboard character map was changed - possibly during updates? – thinice Nov 29 '11 at 20:03
  • 1
    If you run reset followed by stty sane does the problem go away? – voretaq7 Nov 29 '11 at 20:27
  • 1
    @voretaq7 - no, but I'm not exactly sure what it means to run those from a script (obviously I can't run them from the CLI since they contain e :( Is there anything needed in my script to say "this applies to my shell session"? – Kato Nov 29 '11 at 20:31
  • 3
    Also look in ~/.inputrc and /etc/inputrc for broken readline keybindings. – Sergey Vlasov Nov 29 '11 at 20:44

You've mistakenly put:

export EDITOR=/usr/bin/emacs

into your /etc/inputrc. This will map the letter 'e' to nothing at all.

Remove that and you should be fine.

| improve this answer | |
  • 1
    Thanks so much for the assist! Got to remember not to let people program while I'm out drinking ;( – Kato Nov 29 '11 at 22:43
  • 5
    Can someone explain why setting an environment variable breaks the letter 'e'? – Russell Borogove Jun 8 '15 at 16:23
  • 3
    /etc/inputrc is NOT for environment variables. It's a specific input format read by readline. – MikeyB Jun 8 '15 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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