Skip to content
ohsudo, Home

Learning path

Linux: from zero to fixing a server

From your first ls to a server that won't start, in a terminal in your browser.

5 stages · 29 steps

  1. Stage 1

    First steps in the shell

    Move around, work with files, and find help, in a safe terminal in your browser.

    1. 1

      Lesson

      Find your way around: pwd, ls and cd

      Learn to move around a Linux system with pwd, ls and cd in a real terminal in your browser, with automatic checks, on Ubuntu or on RHEL, Rocky and AlmaLinux.

    2. 2

      Lesson

      Create, copy, move and delete: mkdir, touch, cp, mv, rm

      Practice creating, copying, moving and deleting files and folders on Linux with mkdir, touch, cp, mv and rm, in a safe terminal in your browser, with automatic checks.

    3. 3

      Lesson

      Read files: cat, head, tail and less

      Learn to read files on Linux with cat, head, tail and less, check which system you're on, and read a protected log with sudo, on Ubuntu or RHEL, Rocky and AlmaLinux.

    4. 4

      Lesson

      Help yourself: help, man, Tab and history

      Stop memorizing Linux commands: learn to find the answer with help and man, type less with Tab, reuse commands with history, and check who you are with id.

  2. Stage 2

    Text and logs

    Search, filter and count lines: the everyday skill behind every investigation.

    1. 5

      Lesson

      Search logs with grep

      Learn grep on a real log, in your browser: find errors, ignore case, count matches, exclude lines, search whole folders, and read the login log on Ubuntu or RHEL.

    2. 6

      Lesson

      Connect commands: pipes and redirects

      Learn how Linux commands work together: pipes, saving output with > and >>, hiding errors with 2>/dev/null, and tee, practiced on a real log in your browser.

    3. 7

      Lesson

      Count and sort: wc, cut, sort and uniq

      Find the busiest IP address in a web server log with wc, cut, sort and uniq, building one command step by step, in a real terminal in your browser, with automatic checks.

    4. 8

      Lesson

      Change text in files with sed

      Learn sed on a real config file, in your browser: preview a replacement, change the file with -i, keep a backup, replace all matches, print and delete lines.

    5. 9

      Lesson

      Find files with find

      Learn the find command in a real terminal in your browser: search by name, type and size, spot empty files, delete safely, and find config files on Ubuntu or RHEL.

    6. 10

      Cheat sheet

      find, grep, sed and awk Cheat Sheet

      Keep it open while you work.

  3. Stage 3

    Permissions and users

    Who may read, write and run what, and how sudo fits in.

    1. 11

      Lesson

      What rwx means, and chmod

      Learn what rwx means, why a script says Permission denied, and how to fix it with chmod, including numbers such as 600 and 755, in a real terminal in your browser.

    2. 12

      Lesson

      Owners, chown and sudo

      Learn who owns a file on Linux, why you get Permission denied, how sudo helps, and how to hand files to the web server with chown, on Ubuntu or RHEL and Rocky.

    3. 13

      Article

      "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.

    4. 14

      Article

      "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.

  4. Stage 4

    The system

    Disks, processes, services and ports, and the errors that come with each.

    1. 15

      Lesson

      Disk space: df and du

      Learn to check disk space on Linux with df, find what uses it with du, sort the results and free some space, in a real terminal in your browser, with automatic checks.

    2. 16

      Lesson

      Processes: ps and kill

      Learn to see what's running on Linux with ps, find a process with grep, stop it with kill, and know why services should be stopped with systemctl, in your browser.

    3. 17

      Lesson

      Services: systemctl and journalctl

      Learn to check, stop and start services with systemctl, read their logs with journalctl, and see which names differ between Ubuntu and RHEL, Rocky and AlmaLinux.

    4. 18

      Lesson

      Ports: ss, lsof and curl

      Learn to see what's listening on a Linux server with ss and lsof, test it with curl, and solve a port conflict between two web servers, on Ubuntu or RHEL.

    5. 19

      Cheat sheet

      systemctl and journalctl Cheat Sheet

      Manage Linux services and read their logs: start, stop, enable, status, failed units, overrides, timers, and filtering journalctl by unit, time and priority

    6. 20

      Article

      "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.

    7. 21

      Article

      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.

    8. 22

      Article

      "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.

    9. 23

      Article

      Linux process "Killed" with no error: find the OOM killer and stop it happening again

      A process that just prints "Killed" (exit code 137) was usually stopped by the Linux OOM killer. Find it in the kernel log, see what used the memory, and fix it.

    10. 24

      Article

      "Too many open files" on Linux: raise the right limit, or find the leak

      Fix "Too many open files" (EMFILE): check a process's real limit in /proc, raise LimitNOFILE for systemd services, and tell a low limit from a file descriptor leak.

  5. Stage 5

    Real incidents

    Put it together on broken servers, then keep the checklist for the next one.

    1. 25

      Lesson

      Incident: the disk is filling up

      A real incident to solve in your browser: a server is running out of disk. Find what's using the space with df, du and find, then free it safely with truncate.

    2. 26

      Lesson

      Incident: Nginx won't start

      A real incident to solve in your browser: after a config change Nginx won't start. Read the error, find the line with nginx -t, fix it and start the service again.

    3. 27

      Lesson

      Incident: the site gives a 502

      A real incident to solve in your browser: the API answers 502 Bad Gateway. Trace it from Nginx's error log to a crashed backend. On RHEL, SELinux adds one more step.

    4. 28

      Guide

      Disk full or server out of memory? Find the cause, step by step

      No space left, a read-only disk, killed processes, or a limit reached.

    5. 29

      Cheat sheet

      Linux Troubleshooting Cheat Sheet

      The commands to find out what is wrong on a Linux server: disk, memory, services, logs, ports, permissions, SSH and SELinux, on one printable page.

Your progress is saved in this browser only, never sent anywhere. Clearing the browser data clears it too.

All learning paths →