How do I do Home and End in iterm2? Home and End do nothing in iTerm2, nor do ⌘← and ⌘→.

However, Ctrl-A and Ctrl-E do work.

Can Home and End do this?

Preferences->Keys_Key Bindings in iTerm2 do not offer a "Start of Line" or  "End of Line option.

Related: 1, 2
^ ControlA and ^ ControlE are keybinding in Bash and ZSH, not in iTerm (or Terminal).

If you want custom bindings within iTerm, you will need to bind the actual keyboard sequence in the keybinding.  "Start of Line" and "End of Line" are descriptors, not the actual key strokes.

So, to do this you'd need to send ^ ControlA for Home via their Hex Codes.  In this case, the codes would be 0x01 for "start of text" (^A) and 0x05 for "ENQ" (^E).

In the image below, you can add a new binding in Preferences → Keys → Key Bindings


Click on + to add a new binding
Click on Record in the dialog box
Press your desired key (Home in this case).  
Select your Action (you can scroll or search).  Select "Send Hex Code"
Enter the Hex Code (0x01 for "start of text")
Test it out!