Family Encyclopedia >> Electronics

11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Apple's macOS includes Terminal, a powerful UNIX-based tool akin to Windows Command Prompt. While it can seem intimidating—one wrong command might cause issues—most tweaks are harmless and let you customize your Mac effortlessly. As a macOS power user with years of experience, I've relied on these commands to streamline my workflow without risking stability.

11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Terminal unlocks advanced tweaks for performance and convenience. If you're new to it, start with these safe, proven commands. Here's my curated list of 11 must-know Terminal tricks for macOS.

Note: When copying commands, scroll fully right to select the entire line in the gray box. Partial copies won't work.

1. Open Folders and Files Instantly

Terminal shines for launching folders or files discreetly, bypassing Finder exposure. For example, to open Documents:

open ~/Documents

This launches Finder straight to Documents. To open a specific file with its default app, like a DOCX in Microsoft Word:

open -a "Microsoft Word" ~/Documents/SoP_Prajith_New.docx
11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Use wildcards like *.docx for quick access, but avoid multiples to prevent slowdowns.

2. Change Default Screenshot Save Location

macOS saves screenshots to Desktop by default, cluttering it—especially with iCloud sync. Redirect them easily:

defaults write com.apple.screencapture location ~/Downloads
11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Apply changes:

killall SystemUIServer

Restart for reliability. Swap ~/Downloads for any path.

3. Switch Screenshot Format (PNG, JPG, PDF)

Default is PNG (post-Mojave), but customize to JPG or PDF:

defaults write com.apple.screencapture type PNG
killall SystemUIServer

PNG files are larger; monitor storage.

4. Reveal Hidden Files in Finder

Finder hides system files by default. Toggle visibility:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
11 Essential macOS Terminal Commands to Boost Your Mac Productivity
killall Finder

Files appear grayed. Toggle off with FALSE.

5. Disable Dashboard

Dashboard is outdated; disable it to avoid accidental opens:

defaults write com.apple.dashboard mcx-disabled -boolean TRUE
killall Dock

Re-enable with FALSE.

6. Download Files Directly

Skip browsers for downloads with curl. Navigate first:

cd ~/Downloads
11 Essential macOS Terminal Commands to Boost Your Mac Productivity
curl -O https://get.videolan.org/vlc/3.0.7.1/macosx/vlc-3.0.7.1.dmg

Note: -O (letter O), not zero.

7. Efficient File Backups with Ditto

Ditto copies files verbosely, preserving structure:

ditto -V ~/Downloads/vlc-3.0.7.1.dmg ~/Desktop
11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Ideal for large transfers; adjust paths as needed.

8. Always Display File Paths in Finder

Mimic Windows Explorer:

defaults write com.apple.finder _FXShowPosixPathInTitle -boolean true
11 Essential macOS Terminal Commands to Boost Your Mac Productivity
killall Finder

9. Enable Charger Connection Chime

Get audio feedback for MagSafe:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app

10. Prevent Mac from Sleeping

Keep it awake temporarily:

caffeinate -u -t 600
11 Essential macOS Terminal Commands to Boost Your Mac Productivity

600 seconds (10 min); use plain caffeinate indefinitely. Closes with Terminal.

11. Check Mac Uptime

Monitor restart needs:

uptime
11 Essential macOS Terminal Commands to Boost Your Mac Productivity

Master Terminal Safely

These commands work on Mojave and later. Always verify from trusted sources—avoid untested ones. Double-check destructive commands. With practice, you'll wield Terminal like a pro for peak Mac performance.

Next: Customize your macOS lock screen for a fresh look.