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 -tfor transparency) - Accessing hidden macOS functions
Time-Saving Terminal Shortcuts
- Clear clutter:
clearresets your workspace - Command history: Press ▲/▼ arrow keys to reuse past commands
- Drag-and-drop path: Type
cdthen drag a folder into Terminal for automatic path filling
5 Powerful macOS-Exclusive Commands
- Dock delay removal:
defaults write com.apple.Dock autohide-delay -float 0; killall Dock - Prevent sleep:
caffeinate(cancel with Ctrl+C) - Change screenshot format:
defaults write com.apple.screencapture type jpg - Add Dock spacers:
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock - 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:
- Navigate to project folder:
cd Downloads/manim - 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
- Practice navigation:
cdto three different folders using absolute paths - Create/delete test files:
touch test.txt→rm test.txt - Run
caffeinateduring downloads to test sleep prevention - Install one CLI tool via Homebrew (
brew install [tool]) - 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.