Jump to the start or end of a command line
Typo at the start of a long command? Don't hold the arrow key. Two keys take you there instantly.
- Type or recall a long command, but don't press Enter.
- Press
Ctrl+Ato jump to the start of the line. - Press
Ctrl+Eto jump to the end. - Press
Alt+BandAlt+Fto move back and forward one word at a time.
Tip: Home and End may do the same on some keyboards. Ctrl+A and Ctrl+E work even where they don't.
Try it now: Press the up arrow to recall your last command, then jump between its start and end with
Ctrl+A and Ctrl+E.Next crumbs
- 💻 Terminal & gitSearch your shell history with Ctrl+RStop pressing the up arrow 40 times. Type any part of an old command and it appears.
- 💻 Terminal & gitRerun the last command with sudo !!Got "permission denied"? Don't retype it.
!!means "the previous command." - 💻 Terminal & gitJump back with cd -Toggle between your last two directories, like Alt+Tab for folders.