Keyboard Shortcuts

  • Control+F: Move forwards
  • Control+B: Move backwards
  • Control+P: Move up
  • Control+N: Move down
  • Control+A: Got to beginning of the line
  • Control+E: Got to end of the line
  • Control+D: Delete forwards
  • Control+H: Delete backwards
  • Control+K: Delete to the end of the line
  • Control+U: Delete the entire line


  • iTerm2: Better terminal app for macOS
  • Sublime Text: Alternative text editor with plugins, aimed at developers
  • Visual Studio Code: Another text editor with plugins (alternative to Sublime Text and Atom)

Terminal Tricks

Want colored

output? Here’s how (Source: Bill Szerdy via Stack Overflow)!

  1. Open the file
     located in your home directory (path:
    ) with your text editor of choice. I used
    , but
     or a graphical text editor (not TextEdit, maybe Visual Studio Code or Sublime Text!) would work as well.
  2. At the bottom, add:
    • export CLICOLOR=1
    • If you want colors other than the default, also do
      . You can get the
       from this website: LSCOLORS Generator.
  3. Save the file!
  4. Type:
    source ~/.bash_profile
    . ~/.bash_profile

What about locking your Mac from the terminal? I just added an alias for

pmset displaysleepnow
alias lockscreen="pmset displaysleepnow"
. (Source: jordanbtucker via Stack Overflow

This guide is using