Skip to content

Instantly share code, notes, and snippets.

@fmtarif
Last active October 23, 2017 15:18
Show Gist options
  • Select an option

  • Save fmtarif/d7965701413fc0f27e3f to your computer and use it in GitHub Desktop.

Select an option

Save fmtarif/d7965701413fc0f27e3f to your computer and use it in GitHub Desktop.
#linux #cli Command line editing shortcuts
-- From http://stackoverflow.com/a/16687377
Clean up the line: You can use Ctrl+U to clear up to the beginning if cursor is at end.
Clean up the line: Ctrl+K to wipe the current line in the terminal if cursor is at beginning
Cancel the current command/line: Ctrl+C.
Recall the deleted command: Ctrl+Y
Go at the beginning of the line: Ctrl+A
Go at the end of the line: Ctrl+E
Remove the forward words for example, if you are middle of the command: Ctrl+K
Remove characters on the left, until the beginning of the word: Ctrl+W
To clear your entire command prompt: Ctrl + L
Toggle between the start of line and current cursor position: Ctrl + XX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment