Tuesday, 3 Mar 2026

8 Essential Mac Terminal Commands for Beginners: Master CLI Basics

Navigating Your Mac with Terminal

Struggling to export animations with transparent backgrounds forced me to confront my terminal ignorance. Like many creatives, I'd avoided the command line until necessary tools like Manim required it. Here's what every beginner must know:

Understanding Core Navigation Commands

cd (change directory) moves between folders. Start with cd Desktop to jump directly to your desktop. When lost, pwd (print working directory) reveals your location. To view folder contents, ls lists all accessible directories.

Pro tip: If ls shows "operation not permitted," grant Terminal Full Disk Access in System Preferences > Security & Privacy.

The cd .. command moves back one level. Want to jump multiple levels? Use cd Desktop/your_folder with Tab autocomplete for speed. Absolute paths (starting from root /) like cd /Users/YourName/Desktop work from any location.

File Operations: Creation and Deletion

mkdir project_folder creates new directories. Inside, touch animation.txt generates files instantly. Delete carefully: rm animation.txt removes files permanently, bypassing Trash.

Critical safety note: Combine rm with -r for folders (rm -r project_folder), but double-check paths. One mistyped command can erase critical data.

CLI vs GUI: Why Terminal Matters

Graphical interfaces (GUI) use icons; command-line interfaces (CLI) use text. CLI offers precision for tasks like:

  • Installing developer tools (e.g., Manim via pip install)
  • Running scripts with flags (e.g., manim -t for transparency)
  • Accessing hidden macOS functions

Time-Saving Terminal Shortcuts

  • Clear clutter: clear resets your workspace
  • Command history: Press ▲/▼ arrow keys to reuse past commands
  • Drag-and-drop path: Type cd then drag a folder into Terminal for automatic path filling

5 Powerful macOS-Exclusive Commands

  1. Dock delay removal: defaults write com.apple.Dock autohide-delay -float 0; killall Dock
  2. Prevent sleep: caffeinate (cancel with Ctrl+C)
  3. Change screenshot format: defaults write com.apple.screencapture type jpg
  4. Add Dock spacers: defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock
  5. Network speed test: networkQuality

Warning: Test these in safe environments. Revert changes with:

# Reset dock delay  
defaults delete com.apple.Dock autohide-delay  

# Restore PNG screenshots  
defaults write com.apple.screencapture type png  

Putting Terminal Skills to Work

To export Manim animations with transparency:

  1. Navigate to project folder: cd Downloads/manim
  2. Run: manim -t your_file.py YourScene

Key insight: CLI flags like -t modify command behavior. Always check documentation with man [command] (e.g., man manim).

Action Checklist for CLI Mastery

  1. Practice navigation: cd to three different folders using absolute paths
  2. Create/delete test files: touch test.txtrm test.txt
  3. Run caffeinate during downloads to test sleep prevention
  4. Install one CLI tool via Homebrew (brew install [tool])
  5. Backup data before experimenting with system commands

Which terminal command intimidates you most? Share your blockers below—I'll offer troubleshooting tips based on your workflow.

Ready to create code-based animations? Explore the Manim beginner's course mentioned in the original video.

PopWave
Youtube
blog