Command Line Basics
Move around files, run programs, chain commands together, and stop being afraid of the terminal — every other tutorial assumes this.
Almost every developer tool you'll meet — Git, Node.js, Docker, NestJS,
deployment to a server — is used from the command line. Tutorials
will casually say "run npm install" or "cd into the project folder"
and move on, as if everyone already knows what that means. This series
is where you learn it, properly, from the very first keystroke.
It starts with what the terminal and the shell actually are, then moves
through the commands you'll use every day: moving around folders,
creating, copying and deleting files, reading them, searching through
them, and connecting commands together with pipes. Later chapters cover
the things that confuse beginners most — processes, environment
variables, PATH, and permissions — and the final chapter ties it all
together in your first shell script.
Every example works in Bash or zsh, the shells used on macOS and
Linux. On Windows you'll use the same commands through WSL or Git
Bash — chapter 1 shows you how to set that up. All the exercises
happen inside one practice folder, ~/cli-practice, so nothing you do
can touch your real files.
This series builds directly on
How Computers Work, especially its
chapters on files, processes, and input/output. It deliberately leaves
out advanced scripting (loops, sed, awk), SSH, and tmux — those come
later, in the series that need them.
When you finish, the natural next step is Git & GitHub for Beginners, which you'll drive entirely from the terminal.
- 01What Is the Command Line?Terminal vs. shell vs. command line, why developers still type commands, how to open one on macOS, Linux, and Windows, and how to read the prompt.
- 02Your First CommandsHow a command is built from a name, options, and arguments; the keyboard shortcuts that save you hours; and how to get help when you're stuck.
- 03Moving AroundWhere am I, what's here, and how do I get there: pwd, ls, cd, absolute and relative paths, and setting up your practice folder.
- 04Working with Files and FoldersCreate, copy, move, rename, and delete files and folders with mkdir, touch, cp, mv, and rm — plus wildcards, names with spaces, and why rm has no undo.
- 05Reading and Editing FilesLook inside files with cat, less, head, and tail, follow a log as it grows, edit text with nano, and escape from vim when it opens by surprise.
- 06Pipes and RedirectionSend output into files with > and >>, keep errors separate with 2>, and chain small commands like grep, sort, uniq, and wc into pipelines that answer real questions.
- 07Finding ThingsFind files by name, type, size, and age with find; search inside files across a whole project with grep -r; and find out where a command lives with which and type.
- 08Processes from the TerminalSee what's running with ps and top, stop programs with Ctrl + C and kill, run things in the background, read exit codes, and fix the classic "port 3000 is already in use" error.
- 09Environment Variables and PATHShell variables, environment variables and export, how PATH decides which program runs, why "command not found" happens right after installing something, and making changes permanent with .zshrc, .bashrc, and aliases.
- 10Permissions and sudoRead the rwx permissions in ls -l, change them with chmod, understand why scripts need ./ and +x, and use sudo — and know when not to.
- 11Putting It All TogetherWrite your first real shell script — a project generator that uses folders, files, variables, arguments, exit codes, permissions, and PATH — then install it as your own command.