🏴☠️ Becoming a Cap10 of the Command Line
Objective: Teach absolute beginners how to confidently navigate and manage files in macOS using the Terminal.

Launching the Terminal
First, find the Terminal app in /Applications/Utilities
or via Spotlight. When it opens, you’ll see a prompt—your helm for issuing commands.
$ pwd
/Users/YourName # Shows you're in your Home directory (home is shown as ~
)
Think of your Home directory as the captain’s quarters—your personal space where your files and folders reside.
1. Understanding the Mac File System
Before diving into the Terminal, let’s get a clear picture of how macOS organizes files.
Key Concepts
- Root Directory (/): The top-level directory where the entire file system begins.
- User Folders: Located in
/Users/
, each user has a home directory (e.g.,/Users/yourname
). - Applications: Stored in
/Applications
. - System Directories: Folders such as
/Library
,/System
, and/usr
. - Paths: Absolute paths start with
/
and uniquely define a file’s location.
Example Structure
/
├── Applications
├── Library
├── System
├── Users
│ └── yourname
│ ├── Documents
│ ├── Downloads
│ ├── Desktop
│ └── Pictures
3. Intermediate Command Line Power Moves
Elevate your command-line mastery:
- Chaining:
cmd1 && cmd2
runs second only if first succeeds (e.g.,mkdir test && cd test
). - Piping:
cmd1 | cmd2
sends output of one into another (e.g.,ls | grep ".txt"
). - Repeat Last: Type
!!
to rerun previous command. - History: Use
history
or ↑/↓ arrows to browse past commands. - Manual Pages:
man command
shows docs (pressq
to quit). - Aliases: Create shortcuts in
~/.zshrc
or~/.bash_profile
, e.g.,alias ll="ls -la"
.
Developer Tools (Sneak Peek)
Your full command-line arsenal will include:
- Homebrew: Install with
/bin/bash -c "$(curl -fsSL https://brew.sh)"
, thenbrew install git python
. - Git: Check with
git --version
to manage code versions. - Python: Run scripts:
python3 script.py
. - VS Code CLI: If VS Code is installed, use
code .
to open the current folder.
4. Final Challenge: Prove Your Command Line Captaincy
- Create a folder called
Projects
inDocuments
. - Create
readme.txt
insideProjects
and write “Hello, Cap10!”. - Rename it to
info.txt
. - Move it to
Desktop
, then delete it. - List all
.txt
files in/Users/yourname/Documents/
.
5. Key File Locations & Tools Available in the CLI
Here’s a treasure map of important places and tools on your Mac:
Common Directories
/Applications
: Where most of your apps live. Open apps viaopen -a AppName
./usr/local
: Homebrew’s territory; checkecho $PATH
to see where executables live.~/.bash_profile
or~/.zshrc
: Your shell’s config file for aliases and environment tweaks.~/Documents
,~/Downloads
,~/Desktop
: Your personal folders—navigate withcd ~/Documents
, etc./etc/hosts
: Map hostnames to IPs; view withcat /etc/hosts
./var/log
: System logs—watch real-time withtail -f /var/log/system.log
.
Handy Tools You’ll Encounter
- Homebrew (
brew
): Install packages (e.g.,brew install git
,brew install python
). - Git (
git
): Version control; start withgit --version
. - Python (
python3
): Run scripts:python3 script.py
. - VS Code CLI (
code
): Open current folder in VS Code:code .
.
That’s a lot of territory covered! Explore at your own pace, and remember, you can always consult man
pages or use find
if in doubt. In future posts, we’ll dive deeper into Git, Python, and more. Until then, fair winds and happy sailing, captain!