Terminal Cheat Sheet

April 20, 2019  

These commands are my most used commands when I’m using my terminal for whatever reason.

Command Purpose
brew install Installs software from Homebrew
brew re-install Re-installs software from Homebrew
ls -la [path] Check who owns directory
id -un Check if your current user owns the directory
sudo chown -R [owner] change permission access of root files to admin
ps -ax; kill(PID number) Force quits an unresponsive application
brew pin Pin a specified formulae, preventing them from being upgraded when issuing the brew upgrade command.
brew list -1 List installed formulae, one entry per line, or the installed files for a given formulae.
brew list –pinned Show the versions of pinned formulae, or only the specified (pinned) formulae if formulae are given.
brew update && brew outdated Fetch the newest version of Homebrew and all formulae, then list outdated formulae.
brew upgrade && brew cleanup Upgrade outdated, unpinned brews (with existing install options), then removes stale lock files and outdated downloads for formulae and casks, and removes old versions of installed formulae.
bubo && bubc Updates Homebrew, lists outdated formulae, upgrades oudated and unpinned formulae, and removes stale and outdated downloads and versions.
brew update && brew cask outdated Fetch the newest version of Homebrew and all formulae, then list outdated casks.
brew cask reinstall $(brew cask outdated) && brew cleanup Updates outdated casks, then runs cleanup.
npm outdated Checks outdated node packages
npm update -g Updates all packages

Buy me a beer Buy me a beer