The operating system your products run on, understood properly. Where Linux came from and how it got here, how it's actually built, and the four skills that matter in production: managing it, tuning it, hardening it, and configuring it — with Ubuntu and RedHat covered side by side.
"Linux" is, strictly, just the kernel — the core program that talks to hardware. What you install and run is a distribution: that kernel plus the GNU userland tools, libraries, and a packaging system. Understanding that split explains almost everything else.
Linux is a reimplementation of ideas from Unix (Bell Labs, 1969). From Unix it inherited a design philosophy that still shapes daily work: small tools that each do one thing well, connected by text streams, over a system where everything is a file. That philosophy is why you can chain simple commands into powerful one-liners, and why so much of the system is just readable text in files.
In 1991 Linus Torvalds wrote a free Unix-like kernel; combined with the GNU project's free tools, it became a complete, open operating system anyone could use and modify. That openness is why it ended up everywhere.
Two worlds, exactly as in the Operating Systems course:
The shell is not special — it's just a userland program that reads your commands and asks the kernel to run them. "Everything is a file" takes the abstraction further: devices (/dev/sda), running-kernel state (/proc), even network sockets are accessed through the same file interface. One uniform way to touch everything.
Linux lays out directories by a standard, so you always know where to look:
| Path | Holds |
|---|---|
| /etc | System configuration — all text, all editable |
| /var | Variable data: logs (/var/log), spools, caches |
| /home | Users' personal files |
| /usr | Installed software and its libraries |
| /bin, /sbin | Essential commands (user / system) |
| /proc, /sys | Virtual — live windows into the kernel, not real files |
| /dev | Device files |
| /tmp | Temporary scratch, often wiped on reboot |
Your products run on both, so know the lineages. Nearly everything differs only in packaging, defaults, and support model — the kernel and concepts are the same.
| Debian family (Ubuntu) | RHEL family (RedHat) | |
|---|---|---|
| Members | Debian → Ubuntu | RHEL → Rocky / Alma / CentOS, Fedora |
| Packages | .deb · apt / dpkg | .rpm · dnf / yum / rpm |
| Firewall frontend | ufw | firewalld |
| Security module | AppArmor | SELinux |
| Leans toward | Ease, fast-moving, huge community | Enterprise stability, paid support, long lifecycles |
The arc in one paragraph: a hobby kernel in 1991 → the first distributions mid-90s bundling it into usable systems → dominance of the server room in the 2000s (the "LAMP" web stack) → the systemd transition in the 2010s, which unified how services start and are managed → and the cloud-and-container era, where Linux became the invisible substrate of essentially all cloud computing — containers are, after all, just a Linux-kernel feature. Today Linux runs almost every server, all of Android, and most embedded devices. It won by being open, stable, scriptable, and free.
The command line is where Linux is operated. It feels archaic until it clicks, then nothing else is as fast. Two things to master here: composing small tools, and the permission model that governs every file.
The shell (usually bash) is a read-run loop for commands. A couple dozen tools cover most work:
ls -l # list files, long form (perms, owner, size)
cd /var/log # change directory
cat / less # show a file / page through it
grep error # search text for a pattern
find / -name "*.conf" # locate files
cp · mv · rm · mkdir # copy, move, remove, make dir
man ls # the manual — your first stopThe Unix idea made practical: the pipe | feeds one tool's output into the next, and > redirects output to a file. Small tools compose into exactly the query you need:
# which processes are running nginx, sorted?
ps aux | grep nginx | sort
# count error lines in a log, save to a file
grep -c "ERROR" /var/log/app.log > error_count.txt
# top 5 biggest directories here
du -sh * | sort -rh | head -5Every file has an owner, a group, and others, and for each of those three, up to three permissions: read, write, execute. That's the whole model, and ls -l shows it as a 9-character string like rwxr-xr-x.
Permissions are set with chmod, either symbolically (chmod u+x file) or as an octal number where r=4, w=2, x=1 added per group. So 755 = rwx (7) for owner, r-x (5) for group and others. Toggle the bits and watch the number:
Ownership is changed with chown user:group file. Two cautions: chmod 777 (everyone can do everything) is almost always a security mistake, and the SUID bit — which runs a program as its owner rather than the caller — is powerful and a classic privilege-escalation target, so audit it.
Day-to-day administration is mostly this: seeing what's running, controlling services, and keeping software installed and patched. Modern Linux centres on one tool for the middle of those — systemd.
Every running program is a process with a PID. You inspect them with ps aux or the live top / htop, and you control them by sending signals:
kill 1234 sends SIGTERM to PID 1234; kill -9 1234 forces it. Reach for -9 only when polite has failed.
systemd is the first process the kernel starts (PID 1) and the manager for every service after it. You describe services as units and drive them with systemctl; their logs go to the journal, read with journalctl.
systemctl status nginx # is it running? recent logs
systemctl start nginx # start now
systemctl stop nginx # stop now
systemctl restart nginx # stop then start
systemctl enable nginx # start automatically at boot
journalctl -u nginx -f # follow this service's logs liveA service moves between a few states. Drive one and watch:
# Ubuntu / Debian (apt)
sudo apt update && sudo apt upgrade
sudo apt install nginx
sudo apt remove nginx
# RedHat / Rocky / Alma (dnf)
sudo dnf check-update
sudo dnf install nginx
sudo dnf remove nginxBoth pull from configured repositories, resolve dependencies, and track what's installed. Keeping packages current is also your first security control — more on that in Module 5.
Accounts live in /etc/passwd, group memberships in /etc/group. You add a user with useradd (or Ubuntu's friendlier adduser), grant admin rights by adding them to the sudo group (Ubuntu) or wheel group (RedHat), and they then run privileged commands via sudo — which logs every use.
The golden rule: measure before you tune. Performance problems come from one of four resources — CPU, memory, disk I/O, or network — and the whole skill is identifying which before changing anything. Guessing wastes time and often makes things worse.
uptime and top show three load numbers (1, 5, 15-minute averages). The trap: a load of 4 is not inherently bad — you must read it relative to your core count. Load equal to cores means fully utilised; above cores means processes are queueing for CPU. Slide both and see:
| Resource | Watch with | Looking for |
|---|---|---|
| CPU | top, mpstat | high %us (your code) or %sy (kernel), run-queue |
| Memory | free -h, vmstat | low available, heavy swap use |
| Disk I/O | iostat, iotop | high %util, long await times |
| Network | ss, iftop, ip -s | saturated links, dropped packets |
Linux deliberately fills unused RAM with disk cache to speed things up, and hands it back the instant a program needs it. So a nearly-full free -h is usually healthy, not alarming — look at the available column, not free. Real trouble is when the system starts heavy swapping (spilling memory to disk), which vmstat's si/so columns reveal.
Two interfaces expose the kernel's internals as files (everything-is-a-file again): /proc and /sys. Persistent tuning is done through sysctl:
# view and set kernel parameters
sysctl vm.swappiness # how eagerly it swaps (lower = less)
sudo sysctl -w vm.swappiness=10 # try a value now
# make it permanent in /etc/sysctl.conf or /etc/sysctl.d/
# file-descriptor limit — servers hit this constantly
ulimit -n # current open-file limit
# raise it in /etc/security/limits.confCommon high-value tunes for servers: raise the open-file-descriptor limit (busy services exhaust the default), lower swappiness on memory-rich hosts, and increase network connection backlogs (net.core.somaxconn) for high-traffic services. And recall from the cloud course: containers cap their resources with cgroups, the same kernel mechanism you can use directly.
For a platform handling customer financial data, this module isn't optional. Hardening is a few principles applied relentlessly: least privilege, minimise the attack surface, patch fast, and monitor. None are exotic; the discipline is in doing all of them.
Most attacks start at SSH. In /etc/ssh/sshd_config, disable root login and password auth entirely:
PermitRootLogin no
PasswordAuthentication no # keys only
# then: sudo systemctl restart sshd
# add fail2ban to auto-ban repeated failed attempts# Ubuntu (ufw) — deny all in, allow only what you need
sudo ufw default deny incoming
sudo ufw allow 22/tcp && sudo ufw allow 443/tcp
sudo ufw enable
# RedHat (firewalld)
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reloadStandard permissions say what a user can do. Mandatory access control goes further, confining what each program can do even if compromised — so a breached web server can't read files outside its lane. RedHat ships SELinux (keep it Enforcing — don't disable it to fix a problem; write a policy); Ubuntu ships AppArmor (per-program profiles). Leaving these on is one of the highest-value, lowest-effort protections you have.
Toggle the controls below and watch the server's exposure drop — a good mental model for where risk actually lives:
The CIS Benchmarks publish detailed, consensus hardening guides for Ubuntu and RHEL specifically — hundreds of concrete settings. For a regulated lender, working from a recognised benchmark is both good practice and far easier to defend in an audit than a homegrown list.
Everything comes together here: configuration that's repeatable, storage that can grow, logs that don't fill the disk, and automation so you manage a fleet instead of pets. The goal is a host that's reproducible, not hand-crafted.
Almost all Linux configuration is plain text under /etc. That's a gift: you can read it, diff it, and put it in version control. Hand-editing one server is fine; hand-editing fifty is how drift and outages happen. At scale, describe the desired state in Ansible (agentless, declarative — the same idea as Terraform from the cloud course, but for configuring the inside of hosts) and apply it uniformly.
Logs live in the systemd journal (journalctl) and as text in /var/log. Unmanaged, they will eventually fill the disk and take the host down — a classic 3am incident. logrotate automatically compresses and expires old logs; for a fleet, ship logs to a central system so you can search across hosts.
Disks are formatted with a filesystem (ext4 is the Ubuntu default, xfs RedHat's) and attached at a mount point, with permanent mounts defined in /etc/fstab. Use LVM (Logical Volume Manager) rather than raw partitions so you can resize and extend storage later without rebuilding — the difference between a five-minute disk expansion and a painful migration.
df -h # free space per filesystem — check before it bites
du -sh /var/* # what's using space under /var
lsblk # block devices and mounts
# LVM: extend a volume by 10G, then grow the filesystem
sudo lvextend -L +10G /dev/vg0/data && sudo resize2fs /dev/vg0/dataRecurring jobs run via classic cron or modern systemd timers (which log to the journal and handle missed runs better). A few lines of shell script plus a timer handles backups, cleanups, and health checks — the quiet machinery that keeps production healthy.
Pulling the whole course together — before a Linux host serves real traffic:
| Task | Ubuntu | RedHat |
|---|---|---|
| Install a package | apt install | dnf install |
| Update everything | apt update && apt upgrade | dnf upgrade |
| Firewall | ufw | firewalld |
| Access control | AppArmor | SELinux |
| Auto security updates | unattended-upgrades | dnf-automatic |
| Network config | netplan | NetworkManager |
| Grant admin | sudo group | wheel group |
| Default filesystem | ext4 | xfs |
From the kernel-and-userland foundations and the long road from Unix to the cloud, through the shell and permissions, service and package management, performance tuning, hardening, and reproducible production configuration — you have the working mental model and the commands to understand, secure, tune, configure and manage the Linux hosts your products depend on, on both Ubuntu and RedHat.