After this lesson, you will be able to: Navigate the file system, manage files, and run scripts from the terminal using the most common Unix commands.
Almost every developer tool, git, npm, Python, deployment commands, is run from the terminal. This lesson covers the handful of commands you'll actually use every day, and how to use the in-browser editor.
The terminal is a text-based way to talk to your computer. Instead of clicking icons, you type commands. On Mac and Linux it's called Terminal; on Windows it's PowerShell or the WSL shell. The commands in this lesson are the Unix-style ones used everywhere except plain Windows cmd.
Diagram coming soon!
Side-by-side comparison of GUI file explorer (folders, icons) and a terminal window (text prompt with ls and cd commands)
These are the four you will use constantly.
pwd # print working directory (where am I?)ls # list files in current directoryls -la # list everything, with detailscd projects # change directory into projectscd .. # go up one levelcd ~ # go to your home directory
These commands create, copy, move, and remove files.
mkdir my-site # make a directorytouch index.html # create empty filecp index.html backup.html # copymv backup.html old.html # move (or rename)rm old.html # delete filerm -r my-site # delete folder + contents
Use the Shell tab in your editor (or your local terminal) to run these in order.
Type pwd and read the output
Run mkdir bitree-practice and then cd bitree-practice
Create three files: touch hello.py notes.txt readme.md
Run ls -la to confirm they exist
Write a quick Python file with echo "print('hi')" > hello.py and run it with python hello.py
The | (pipe) feeds the output of one command into another. The > redirects output to a file.
ls -la > files.txt # write directory listing to a filecat files.txt | wc -l # count the lines
Pick the one that prints your location.
Sign in and purchase access to unlock this lesson.