Skip to content
ohsudo, Home

Guided Terminal Lessons

Step-by-step Linux challenges in the browser terminal, with automatic checking and saved progress.

● Runs 100% in your browser — nothing you type leaves this page.

0 of 18 lessons finished

Module 1: First steps

  1. Find your way around: pwd, ls and cd8 stepsEverything on Linux lives in one tree of folders, and your terminal is always somewhere in it. These three commands tell you where you are, what's there, and how to move.
  2. Create, copy, move and delete: mkdir, touch, cp, mv, rm7 stepsThese commands change things, and there's no recycle bin on the command line. It's safe to make mistakes here, and Start again puts everything back.
  3. Read files: cat, head, tail and less6 stepsMost troubleshooting starts by reading something: a config, a log, a message. Which command you use depends on how big the file is, and which part you care about.
  4. Help yourself: help, man, Tab and history6 stepsNobody remembers every option. These are the habits that make the command line quick: asking the system itself, letting it finish your typing, and reusing what you've already run.

Module 2: Text and logs

  1. Search logs with grep8 stepsWhen something breaks at 2 a.m., the answer is usually in a log with thousands of lines. `grep` prints only the lines you ask for.
  2. Connect commands: pipes and redirects6 stepsEach command does one small job. The real power comes from connecting them: the output of one becomes the input of the next, or goes into a file.
  3. Count and sort: wc, cut, sort and uniq6 stepsHere's a question you'll really get: who is hitting this server the most? You'll build the answer one piece at a time, on a real access log.
  4. Change text in files with sed7 steps`sed` edits text without opening an editor, which is what you want in a script, or on the same file on many servers. The habit that keeps you safe: preview first, change the file second.
  5. Find files with find6 stepsWhere did that config go? What's filling the disk? `find` walks a folder tree and checks each file against the conditions you give it.

Module 3: Permissions

  1. What rwx means, and chmod6 stepsEvery file says who can read it, write to it and run it. `Permission denied` is one of the first errors everyone meets, and once you can read those letters, it stops being a mystery.
  2. Owners, chown and sudo6 stepsPermissions only make sense together with owners. Here you'll hit the most common wall on a server, a folder that belongs to root, and see the right ways past it.

Module 4: The system

  1. Disk space: df and du5 stepsA full disk breaks databases, logs and logins. Two commands answer the two questions you'll have: how full is it, and what's using it?
  2. Processes: ps and kill6 stepsEverything running on a system is a process with a number, its PID. Here you'll find one that shouldn't be running, and stop it the polite way.
  3. Services: systemctl and journalctl6 stepsWeb servers, databases and SSH all run as services, and systemd looks after them. This is the first place to look when something on a server stops working.
  4. Ports: ss, lsof and curl6 stepsEach network service listens on a port, and only one program can hold a port at a time. In this lesson, Nginx won't start because something already took port 80.

Module 5: Real incidents

  1. Incident: Nginx won't start6 stepsSomeone edited the site's config and rebooted, and now the site is down. There are fewer instructions from here on: read what the system tells you.
  2. Incident: the disk is filling up6 stepsAn alert says the disk is filling up. You've got all the commands for this now, so the steps only tell you what to find out.
  3. Incident: the site gives a 5028 stepsThe home page works, and the API gives a `502 Bad Gateway`. Nginx is up, and something behind it isn't. This one plays out differently on each tab, so try both.

🔒 Your progress is kept in this browser only, and never sent anywhere.

How it works

Each lesson gives you one small task at a time, next to a Linux terminal running in your browser. Type the command, and the lesson moves on when the result is right.

Who it’s for

Anyone who’s new to the Linux command line, or who uses it without feeling sure of it. You don’t need to install anything, or know anything first.

Is it a real Linux?

No, it’s an emulator that behaves like one for these lessons: the commands and their output follow GNU/Linux. So it doesn’t have everything a real system has, and a few things are simpler. For example, less just prints the file instead of letting you scroll. The lessons point those out. To explore freely, use the Linux Terminal Playground.

FAQ

What should I learn first?

Go in order: First steps teaches you to move around, handle files and read them, Text and logs gets you searching and changing text, Permissions and The system cover what you’ll use on any server, and Real incidents puts it together on problems you’re likely to meet.

Do I have to do both tabs?

No. Choose the one closest to the servers you use. If you don’t know, start with Ubuntu. Trying the other one afterwards takes a few minutes, and it’s useful to know the differences.

Where can I look these commands up later?

In the Linux Troubleshooting Cheat Sheet, and in the guides on our articles page.

Articles

Learn more

403 Forbidden
Networking

Nginx "403 Forbidden": read the error log, then fix the index, permissions or SELinux

Fix Nginx "403 Forbidden": the error log says if it's a missing index file, wrong permissions on a parent folder, a deny rule or SELinux. namei checks the whole path.

Beginner · 4 min read

not in the sudoers file
Linux

"user is not in the sudoers file": how to get sudo back, even without the root password

Fix "user is not in the sudoers file": add yourself to the sudo or wheel group with su, recover without a root password, use visudo safely and fix a broken sudoers file.

Beginner · 4 min read

Argument list too long
Linux

"Argument list too long": delete or move thousands of files on Linux

Fix "Argument list too long" for rm, mv, cp or grep with a wildcard: why the kernel refuses, and how find -delete, find -exec + and xargs handle any number of files.

Beginner · 3 min read

Job for nginx.service failed because the control process exited with error code.
Linux

"Job for nginx.service failed because the control process exited with error code": how to find the cause

Fix "Job for X.service failed because the control process exited with error code": read systemctl status and journalctl, test the config, and fix the usual causes.

Beginner · 5 min read

bind() to 0.0.0.0:80 failed (98: Address already in use)
Networking

"Address already in use": find who is using port 80 (or any port)

Fix "bind() failed (98: Address already in use)": find the process holding the port with ss or lsof, then stop it, move it, or change your port.

Beginner · 5 min read

502 Bad Gateway
Networking

Nginx "502 Bad Gateway": find the cause in the error log

Fix nginx 502 Bad Gateway: read error.log, then fix the backend that is down, the wrong address or socket, the crashing app, or SELinux on RHEL.

Intermediate · 5 min read

No space left on device
Linux

No space left on device: find what is filling your Linux disk

Fix "No space left on device" on Linux: find the biggest directories and files, free space safely, and handle the cases where df says there is space.

Beginner · 4 min read

./deploy.sh: Permission denied
Linux

"Permission denied" when running a script: 5 causes and fixes

Fix "bash: ./script.sh: Permission denied" and "bad interpreter" on Linux: execute bits, noexec mounts, directory permissions, Windows line endings and shebangs.

Beginner · 4 min read