Move to Line Start / End
What is Move to Line Start / End?
Move to Line Start / End: Jump the cursor to the beginning (Ctrl+A) or end (Ctrl+E) of the command line. In most terminals, Ctrl+A moves the cursor to the start of the command line and Ctrl+E to the end. They come from the Emacs key bindings that Bash and Zsh use by default. They save a lot of arrow-key presses when you want to add sudo in front of a command or append an option at the end of a long one.
Frequently asked questions about Move to Line Start / End
What should you keep in mind with Move to Line Start / End?
Related shortcuts are worth learning together. Alt+B and Alt+F move back and forward one word, Ctrl+U deletes to the start, Ctrl+K deletes to the end, and Ctrl+R searches your command history. In code editors, Home and End do the job, or Cmd+Left/Right on a Mac. If you use tmux or screen, note that Ctrl+A may be taken as their prefix key.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |