Move to End of Line in Terminal (Ctrl+E)
Press Ctrl+E to send the cursor to the very end of the current command line — identical in bash and zsh across macOS, Linux and Windows (WSL / Git Bash).
| Action | Mac | Windows | |
|---|---|---|---|
| Move to end of line | Ctrl+E | Ctrl+E | |
| Move to beginning of line | Ctrl+A | Ctrl+A | |
| Move forward one word | ⌥F / Esc then F | Alt+F | |
| Move forward one character | Ctrl+F | Ctrl+F | |
| Clear to end of line | Ctrl+K | Ctrl+K |
Jump to the end of the line
Press Ctrl+E in a readline shell (bash or zsh) to move the cursor to the end of the command line. It behaves the same on macOS Terminal, Linux and Windows WSL / Git Bash — the key is the Control key, not ⌘→.
The Ctrl+A / Ctrl+E pair
Ctrl+A is start, Ctrl+E is end. This mnemonic matches Emacs. After jumping to the end with Ctrl+E you can wipe everything before the cursor with Ctrl+U, or everything after with Ctrl+K.
If Ctrl+E does nothing
In vi editing mode (set -o vi) use Esc then $ to reach the end. On macOS Terminal, word-motion keys (Alt+F) need "Use Option as Meta key" turned on in Settings → Profiles → Keyboard.
FAQ
How do I move to the end of the line in a terminal?
Press Ctrl+E in bash or zsh. The cursor jumps to the end of the command line, the same on macOS, Linux and Windows WSL/Git Bash.
Is it Ctrl+E or Cmd+Right on Mac?
In the shell it is Ctrl+E (readline). ⌘→ is a GUI text-field shortcut, not a terminal one.
What is the opposite of Ctrl+E?
Ctrl+A moves to the beginning of the line. Ctrl+A and Ctrl+E are the start/end pair.
How do I go to end of line in vi mode?
If you ran set -o vi, press Esc then $ to move to the end of the line.