Skip to content

Instantly share code, notes, and snippets.

@nkpgardose
Last active February 23, 2016 02:14
Show Gist options
  • Save nkpgardose/2472419eb0c3c18b10db to your computer and use it in GitHub Desktop.
Save nkpgardose/2472419eb0c3c18b10db to your computer and use it in GitHub Desktop.
Useful commands on plain terminal

Useful command using ol' plain terminal

Position the cursor in your terminal

alt + [cursor]

pbcopy & pbpaste

$ echo 'Hello World' | pbcopy
$ echo `pbpaste`

Navigating around the line

ctrl + A # Go to start of the line
ctrl + E # Go to end of the line
ctrl + U # Clear out the whole line
ctrl + K # Clear from cursor position to end of line | Kill
ctrl + Y # To paste text from kill buffer
ctrl + W # Delete from cursor to start of an word
ctrl + S # To forward search in zsh
ctrl + R # Reverse search
ctrl + F
ctrl + B
ESC, B   # Move from cursor to start of an word
ESC, F   # Move from cursor to end of an word 
ESC, delete # Delete from cursor to start of an word

UPDATE Just saw a list of terminal commands here https://github.com/0nn0/terminal-mac-cheatsheet/wiki/Terminal-Cheatsheet-for-Mac-(-basics-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment