Super User is a question and answer site for computer enthusiasts and power users. 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 was wondering if somebody knows how to use home/end keys behave in a Windows/ Linux fashion. What I mean is that when I press Apple + Left (Home combo on a mac book pro laptop) it should go to the beginning of the line, and Apple + Right to the end of the line. Right now they change focus to the top of the scroll history. Drives me crazy.

Home / End keys behave as expected in TextMate and such but not in terminal, which makes me think it's that app specific. I found some page saying that I need to remap key bindings but I can't do that on every mac i touch. So is there another shorcut in Mac I can use or how do I make Home/End keys behave as expected?

Thank you

share|improve this question
Linux does that with home/end keys? I only knew about ctrl-a for beginning of line and ctrl-e for end of line. I thought home/end keys were used only by Windows and OS/2 for that. – Andrew J. Brehm Apr 16 '10 at 8:58
Well at least Debian. You spooked me so I just confirmed using Debian Lenny and Putty on Windows. – konung Apr 16 '10 at 21:10
up vote 1 down vote accepted

There are three levels of key mappings in this case:

  2. The shell, which is probably bash
  3. For bash, the editor mode, which is probably emacs

For emacs, Ctrl-A goes to the beginning of the line and Ctrl-E goes to the end of the line. Here are some other key combos, including for the alternative vi mode.

share|improve this answer
Thank Ken. Works like a charm – konung Apr 19 '10 at 20:21

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.