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

Applications

  • 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

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

  1. Open the file
    .bash_profile
     located in your home directory (path:
    ~/.bash_profile
    ) with your text editor of choice. I used
    nano
    , but
    vim
     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
      export LSCOLORS=YOUR_LSCOLORS
      . You can get the
      YOUR_LSCOLORS
       from this website: LSCOLORS Generator.
  3. Save the file!
  4. Type:
    source ~/.bash_profile
     or
    . ~/.bash_profile
    .

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

pmset displaysleepnow
 in
~/.bash_aliases
:
alias lockscreen="pmset displaysleepnow"
. (Source: jordanbtucker via Stack Overflow

This guide is using

bash
!