<aside> 💡

Every command has a macOS / Linux version and a Windows version. The Windows column is for PowerShell, which comes with Windows 10 and 11. "Same" means you type exactly the same thing.

</aside>

Start here: the 18 you'll use daily

macOS / Linux Windows (PowerShell) What it does
pwd Same Shows which folder you're in
ls Same Lists the files in the current folder. Hidden files too: ls -la (Windows: ls -Force)
cd <folder> Same Moves into a folder (cd .. goes up one level, cd ~ goes home)
mkdir -p <folder> mkdir <folder> Creates a folder, plus any parent folders it needs
cp <from> <to> Same Copies a file. For a folder: cp -r (Windows: cp -Recurse)
mv <from> <to> Same Moves or renames a file
rm <file> Same Deletes a file for good, with no recycle bin. For a folder: rm -r (Windows: rm -Recurse)
cat <file> Same Prints a file's contents
head -n 5 <file> Get-Content <file> -Head 5 Shows the first 5 lines, handy for peeking at a CSV before opening it
tail -n 5 <file> Get-Content <file> -Tail 5 Shows the last 5 lines. To follow a log as it grows: tail -f (Windows: add -Wait)
grep "<text>" <file> Select-String "<text>" <file> Shows the lines that contain some text
find <folder> -name "*.csv" Get-ChildItem <folder> -Recurse -Filter "*.csv" Finds files by name, in every subfolder
wc -l <file> (Get-Content <file>).Count Counts lines (on a CSV, that's the rows plus the header)
sort <file> `Get-Content <file> Sort-Object`
echo $PATH echo $env:Path Prints text or a variable's value
curl <url> curl.exe <url> Fetches a URL, useful for testing an API
ssh user@host Same Connects to a remote machine
history Same Lists the commands you've run

<aside> ⚠️

Worried about breaking something? pwd, ls, cd, cat, head and tail only look, so they're safe to experiment with. Take care with rm (there's no undo), > (overwrites a file without asking) and sudo (runs a command with admin rights). Stuck on what a command does? On macOS / Linux, man <command> opens its manual (q to quit). On Windows, use Get-Help <command>.

</aside>

Shortcuts

These work the same on macOS, Linux and Windows.

Keys What they do
Tab Completes a file or folder name as you type
↑ Brings back your last command
Ctrl+C Stops whatever is running
Ctrl+R Searches your command history

Running scripts

macOS / Linux Windows (PowerShell) What it does
python3 script.py python script.py Runs a Python script
uv run script.py Same Runs it inside your project's environment (see ‣)
export NAME=value $env:NAME = "value" Sets an environment variable for this terminal session

Tools with a command line

The data tools you'll use most all run from the terminal, and their commands are the same on every system (Airflow needs WSL2 on Windows, see below). Five commands each to get you going.

Git

Command What it does
git status Shows what's changed and what's staged
git switch -c <branch> Creates a new branch and moves onto it
git add <file> Stages a file for your next commit (git add . stages everything)
git commit -m "<message>" Saves a snapshot of your staged changes
git push Sends your commits to GitHub (first push on a new branch: git push -u origin <branch>)

More in the Git & GitHub Cheatsheet. Official docs: git-scm.com/docs

dbt

Command What it does
dbt debug Checks your project and database connection work
dbt run --select <model> Builds one model (<model>+ also builds everything downstream of it)
dbt test Runs your data tests
dbt build Runs your models, tests, seeds and snapshots together, in dependency order
dbt docs generate then dbt docs serve Builds your project's documentation site and opens it in your browser

Official docs: dbt commands

Airflow

Command What it does
airflow standalone Starts a local, all-in-one Airflow (prints your login the first time)
airflow dags list Lists the DAGs Airflow can see
airflow dags list-import-errors Shows why a DAG isn't appearing (usually an error in the file)
airflow dags test <dag_id> Runs a whole DAG once, without the scheduler
airflow tasks test <dag_id> <task_id> Runs a single task without recording it in the database

<aside> 🗒️

On Windows, Airflow only runs inside WSL2 or Docker, so run these commands there. Installed Airflow with uv, as in our Apache Airflow Guide (2026)? Put uv run in front of each command, and run airflow db migrate once before your first dags test.

</aside>