Learn the Linux terminal: 20 free interactive lessons
Short lessons where every step runs real commands in a Linux shell inside your browser: moving around, files, grep, pipes, permissions, processes and your first scripts.
Do it in the browser: a real the Linux terminal tool, a short mission and instant feedback. No install. Optional certificate at the end of the course.
Open the courseLessons
- Where am I?Meet the prompt, pwd and ls: the three things you check first in any terminal.
- Moving with cdAbsolute and relative paths, `..`, `~` and `cd -`.
- Options and hidden filesFlags change what a command does: `ls -a`, `ls -l`, `ls -lh` and friends.
- Getting helpman, help, type, which and history: the shell explains itself.
- Make folders and filesmkdir music creates a folder called music here. You can create several at once: mkdir a b c.
- Copy, move, renamecp notes.txt notes.bak makes a copy with a new name. If the destination is a folder, the copy keeps its name inside it.
- Deleting for realrm, rm -r and rmdir. There is no trash can.
- Wildcards`*`, `?` and `[...]` select many files at once.
- Look inside filescat, head, tail and less: see all of a file or just one end.
- Search text with grepFind the lines that matter in files and folders.
- Find filesfind searches names and types in a whole tree.
- Count and sortwc, sort and uniq turn a list into an answer.
- Redirect to filesNormally output goes to the screen. > file sends it to the file instead: nothing appears, and the file holds the result.
- Pipes`|` connects the output of one command to the input of the next.
- Cut, translate, replacecut, tr and sed reshape text on the fly.
- Errors and exit codesWhen a command ends it returns an exit code: 0 means success, anything else means a problem. $? holds the code of the last command.
- Permissions and chmodRead rwxr-xr-x and change it with chmod.
- ProcessesEach running program gets a number, its PID. ps lists the processes of your terminal: your shell (bash), a Python server and a forgotten…
- Variables and environmentcity=Recife creates a variable, with no spaces around =. $city reads it back. The shell replaces $city with its value before running the…
- Your first shell scriptShebang, arguments, if and for: automate what you just learned.