Enabling Home and End functionality in the macOS Terminal

Most Linux terminals I’ve used by default allow you to press Home or End to jump to the start or end of the terminal. macOS doesn’t seem to have this enabled by default. You can manually send the control codes for Home and End (\001 and \005) using Control + A and Control + E, but I find it more convenient to use the Home and End keys available on the keyboard

How to fix this:
1. Open Terminal. Go to Terminal > Preferences.

2. Select the Profiles tab, then choose the profile you want to modify.

3. Go to the Keyboard sub-tab.

4. Click the + button to add a new keyboard shortcut. Set up the following shortcuts: