Nandishwar Singh

Home / Learn Linux

Learn Linux

A free Linux course from zero to running your own server: 30 lessons and 5 guided projects, in order. Every lesson has practice after each command and a bigger practice at the end, with answers you can open when you are done.

Getting started

  1. What Linux is and how to get it →Kernels and distros, which one to pick, and an Ubuntu 26.04 machine of your own in a few minutes.
  2. The shell, commands and getting help →How a command is put together, and how to find out what any command does with man, help and --help.
  3. Terminal speed: Tab, shortcuts, history and sudo →Type less with Tab and shortcuts, reuse old commands, and run things as root safely.

Files and text

  1. The Linux filesystem and paths →What lives in /etc, /var, /home and the rest, and moving around with absolute and relative paths.
  2. Listing files: ls, file types and timestamps →Read ls -l line by line, spot file types, and understand when a file was read, changed and modified.
  3. Reading files: cat, less, head and tail →Open small and huge files, jump around inside them, and follow a log as it grows.
  4. Creating, copying, moving and deleting files →touch, mkdir, cp, mv and rm, the flags that matter, and how not to delete the wrong thing.
  5. Pipes and redirection →Send output into files and into other commands, and keep errors separate from results.
  6. Finding files and text: find, locate and grep →Find any file by name, size, age or owner, act on what you find, and search inside files.
  7. Editing files with Vim →Open, edit, save and quit, then the moves that make Vim fast.
  8. Archives and links: tar, gzip, hard links and symlinks →Pack and compress folders, and the difference between a hard link and a symlink.
  9. Editing text with sed and regular expressions →Change text in files without opening them, using patterns that match exactly what you mean.

Project 1: Clean up a messy folder →Sort hundreds of files by type and age, search logs, archive the old ones and link the latest.

Users and permissions

  1. Users and groups →Where accounts live, adding and changing users and groups, and who is logged in.
  2. File permissions: chmod and chown →Read rwx, set permissions with letters and numbers, and change who owns a file.
  3. Special permissions: SUID, SGID, sticky bit and umask →The permission bits behind passwd, shared folders and /tmp, plus default permissions for new files.

Project 2: A shared team folder →Three users, one group and a folder they can all work in without deleting each other's files.

Processes

  1. Processes: ps, top and htop →See what is running, who started it and what it is costing the machine.
  2. Signals and jobs: kill, bg, fg and nohup →Stop, pause and resume programs, and keep them running after you log out.

Networking and SSH

  1. Network basics: ip, static IPs and troubleshooting →Read your addresses and routes, set a static IP with netplan, and find out why a connection fails.
  2. SSH: connecting, keys and a safer server →Log in to another machine, switch from passwords to keys, and lock down the SSH server.
  3. Moving files over the network: scp, rsync and wget →Copy files between machines, sync folders so only changes move, and download from the web.
  4. Open ports: ss, lsof and nmap (coming soon)Find which programs are listening, on which ports, and what the outside world can see.

Project 3: Backups between two machines over SSH →Two machines, key-only SSH and an rsync backup you can run with one command.

Software and containers

  1. Installing software: apt, dpkg and building from source (coming soon)Install, update and remove software, see what a package contains, and compile a program yourself.
  2. Containers with Podman (coming soon)Run nginx in a container, group containers into pods, and keep data in volumes.

Running a system

  1. Scheduling jobs with cron (coming soon)Run commands every night, every Monday or every five minutes, and check that they ran.
  2. Disks and filesystems: df, mount and dd (coming soon)See what is using space, make and mount a filesystem, and copy whole disks with dd.
  3. Services with systemd and systemctl (coming soon)Start, stop and enable services, read their logs, and write a service of your own.

Project 4: Run a web server like production (coming soon)nginx as a service, its data on its own disk, logs cleaned up by cron, and checks that it survives a reboot.

Bash scripting

  1. Bash scripting 1: variables, input and arguments (coming soon)Write and run your first scripts, store values, read input and accept arguments.
  2. Bash scripting 2: if, loops and case (coming soon)Make scripts decide and repeat: tests, if, for and while loops, and case.
  3. Bash scripting 3: functions, menus and arrays (coming soon)Split scripts into functions, build menus with select, and work with lists in arrays.

Project 5: A server health check script (coming soon)A script that checks disk, memory, services and ports, keeps a log and runs on a schedule.

Going live

  1. Going live: a firewall and a website on a VPS (coming soon)Rent a server, point a domain at it, put up a firewall and serve a website over HTTPS.