Back to technologies

/macos

macOS Terminal command reference

Practical macOS terminal commands for local developer workflows.

14 matches

Files & Finder

4 commands

open .

Open the current directory in Finder.

open file.txt

Open a file with its default macOS application.

pbcopy < file.txt

Copy file contents to the macOS clipboard.

pbpaste > notes.txt

Paste clipboard contents into a file.

System & Productivity

5 commands

sw_vers

Show the installed macOS version.

system_profiler SPHardwareDataType

Display hardware information for the Mac.

top -o cpu

Monitor processes sorted by CPU usage.

caffeinate -d

Prevent the Mac from sleeping while working.

say "Build complete"

Use macOS text-to-speech from the terminal.

Networking & Homebrew

5 commands

ifconfig

Display network interface information.

networksetup -listallhardwareports

List available network hardware ports.

brew update

Update Homebrew package metadata.

brew install wget

Install a package with Homebrew.

defaults read com.apple.finder

Read Finder preference values from the defaults database.