Setting up macOS using the Terminal can be an efficient way to configure your system, install applications, and customize settings. Here’s a step-by-step guide on how to use tools like Homebrew, MAS (Mac App Store CLI), and the defaults command.
You can find Terminal in ```Applications > Utilities > Terminal```, or search for it using Spotlight (Cmd + Space).
Homebrew is a package manager for macOS that allows you to install software easily.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the on-screen prompts to complete the installation.
export PATH="/opt/homebrew/bin:$PATH"
brew update
With Homebrew installed, you can now install various applications. Here are a few commonly used commands:
brew install <package_name>
brew install node
brew install --cask <app_name>
brew install --cask arc
MAS allows you to manage Mac App Store applications from the command line.
brew install mas
Sign in to your Apple ID if prompted when you first use MAS.
mas search <app_name>
mas install <app_id>
You can get the
mas list
The defaults command allows you to modify macOS settings from the terminal.
defaults write com.apple.finder AppleShowAllFiles -bool true killall Finder
defaults write com.apple.screencapture type -string "png" killall SystemUIServer
defaults write com.apple.dock autohide -bool true killall Dock
brew update && brew upgrade
brew cleanup
With this setup, you’ll have a well-configured macOS environment tailored to your needs, and you can even make shell scripts to do most of the setup for you! (Like DSMOSS @ Sneed Group!)