Make [Home] and [End] work in Mac OS X Terminal
Posted by chris on May 10th, 2006
For some reason, the Home and End keys don’t work as you might expect in Mac OS X’s Terminal.app. Instead of moving the cursor to the start and end of the current line, they scroll to the top and bottom of the window’s scrollback history.
You can get the behviour you might expect by pressing Shift+Home and Shift+End, but this is awkward. To fix this and make Home and End do what you expect:
- Open a fresh terminal window
- Choose Terminal->Window Settings from the menu
- Select “Keyboard” from the drop down list
- Select “End” in the list and press Edit
- Choose “send string to shell” and then move to the textbox
- Press <Esc> (33 will appear) then type [F. Press OK.
- Select “Home” in the list and press Edit
- Choose “send string to shell” and then move to the textbox
- Press <Esc> (33 will appear) then type [H. Press OK.
- Press “Use Settings As Default”

April 12th, 2007 at 9:26 pm
For me, those tips didn’t work…
But 01 (Control+a) for home and 05 (Control+e) for end worked just fine on my MacBook ;)
April 12th, 2007 at 9:28 pm
By 01 and 05 understand \01 and \05…
April 12th, 2007 at 9:30 pm
…ok, sure this time that’s it : \001 and \005
February 10th, 2008 at 8:12 pm
I’m on a macbook and ssh’ing to an Ubuntu Server box. This didn’t work for me when in a Linux terminal but the following page fixed it perfectly:
http://crz.lt/2007/11/23/leopard-terminal-naming-tabs-selecting-path/
August 31st, 2008 at 2:50 pm
I’m on an iBook G4 with Mac Os X 10.5 and this trick did it :-) . Thanks a lot. Alex