By default in Terminal.app the home and end scroll the the top of the screen and the end of the screen buffer respectively. To make Terminal act like a normal console (in other words the home key moves the cursor to the beginning of the line, and the end key moved the cursor to the end of the line, etc) do the following:
- Open Terminal
- Open Terminal's preferences
- Goto the Settings Tab
- Goto the Keyboard Tab as shown below

- Select the end key settings
- Change the action setting to send string to shell as below

- In the text box below the action setting, enter the key combination of ctrl-e.
- The text \005 should appear like below

- Click OK
- Select the home key
- Change the action setting to send string to shell
- For this key enter the key combination of ctrl-a
- The text \001 should appear like below

- Click OK and close the preferences.
The end and home keys should now act like a normal console in Terminal. Enjoy!
Resource: http://blog.yiqiang.org/2007/12/fixing-home-and-end-key-for-terminalapp.html
May 11th, 2008 at 02:36 PM Thanks -- Thats one less annoying Mac-ism.
May 11th, 2008 at 02:36 PM Thank you, this was driving me absolutely crazy!
November 22nd, 2008 at 06:08 AM
Thank you so much. This saves my day.
November 29th, 2008 at 05:17 PM
Great tip! Saved me the move back to iTerm.
December 22nd, 2008 at 07:47 PM
Thanks for your tip. I don’t really understand why apple decided that the home/end keys should work like this in the first place.