Terminal Hotkeys and Commands Cheat Sheet

Hotkeys when working with Terminal

Hotkey Group Hotkey (OS X) Description
Nagivation Ctrl + A / E Go to beginning / end of line
Navigation Option + / Go to the left / right by a word
Clearing Ouput Ctril + L Clear screen
Clearing Ouput Command + K Clear screen (all)
Clearing Ouput Command + L Clear previous command’s output
Editing Ctril + U Cut to the beginning of line
Editing Ctril + K Cut to the end of line
Editing Ctril + W Cut 1 word backwards
Command History Ctril + R Reverse-search commands in history
Process Ctril + C Kill program/process

Hot Commands when working with bash

Command Group Command Description
Manual man <command_name> You don’t know how to use the command?
  Open -a "sublime text" [file_name] open the file file_name with sublime text
  top display active processes
  screen, screen -r use screen especially when doing remote ssh
Finding find <dir(s)> -name/iname <file_name_pattern> [-type <f/d>] find files/directories
Finding find . -type f -size +100M  
  tar -czvf <output_name> <dir(s)_to_compress> compress files/directories
  tar -xzvf <archive_file> [-c <output_dir>] extract files/directories
  ps aux display current active processes
  kill <pid> kill a process using the process id

Leave a Comment