15

On a Macbook Pro keyboard, how do you go the the end-of-line and beginning-of-line in Terminal.app?

Note that Ctrl-a and Ctrl-e on this computer with default configuration does not work. They just echo "^A" and "^E"....

Terminal 2.1.1 ; Snow Leopard ; MacBookPro6,2

malatio
  • 445

2 Answers2

33

Ctrl + a and Ctrl + e for beginning and end respectively.

Bonus: Ctrl + w deletes the previous word.

EDIT: As far as I can tell, you are using the zsh shell, which by default does not use Emacs key bindings. To get the behaviour you want, do the following during your session:

echo "bindkey -e" >> ~/.zshrc && source ~/.zshrc

You should be good to do. For more keybinding information, please check the relevant section from the Zsh manual.

roguesys
  • 3,110
6

fn+ and fn+ work for me (they represent Home and End respectively).

More convenient than ctrl+A and ctrl+E in my opinion.