Foundations15 lessons · about 7 hoursHigh complexity

Linux and the Command Line

How to run and administer a Linux server from the shell, from the first command to keeping production healthy. Fourteen lessons cover files, text, the shell, permissions, processes, services, packages, storage, networking, SSH, scripting and troubleshooting, to the depth of RHCSA, LFCS and CompTIA Linux+. Every lesson ends with a lab you do on your own virtual machine, and every transcript is real output. A worked case at the end puts the whole course to work on one realistic problem. Press the down arrow on any page marked Go deeper for the full detail.

After this course you can

  • Work fluently in the shell: find, filter and change files and text, and read what a server is telling you.
  • Administer a server: users and permissions, services, packages, disks and LVM, networking, firewalls and SSH.
  • Automate with Bash and cron, and diagnose a sick server from the symptom, SELinux denials and failed boots included.

Lessons

15 lessons
1 What Linux is, and your first commandsLinux, distributions, a practice machine, the terminal and getting help 25 min 2 Files and directoriesMoving around, paths, the directory tree, copying, links, finding and archives 30 min 3 Viewing and editing textcat, less, head and tail, nano and vim, and changing a settings file safely 25 min 4 Pipes and text toolsStreams, redirection, pipes, grep, sort, sed and awk 30 min 5 How the shell worksExpansion, quoting, variables, PATH, exit status and history 30 min 6 Users, groups and permissionsAccounts, rwx, chmod and chown, sudo, special bits and ACLs 30 min 7 ProcessesPrograms and processes, top and ps, signals, jobs, load and priorities 25 min 8 Services and start-upServices, systemctl, the journal, unit files, boot and scheduled jobs 30 min 9 Installing softwarePackages, repositories, apt and dnf, Flatpak and source builds 25 min 10 Disks and file systemslsblk and df, partitions, mkfs, fstab, LVM, swap and NFS 30 min 11 NetworkingAddresses, routes, DNS, nmcli, listening ports and the firewall 30 min 12 SSH and remote workLogging in, known hosts, keys, config, copying files and hardening 25 min 13 Shell scriptsA first script, variables, tests, loops, failing safely and cron 30 min 14 Troubleshooting a serverTriage, logs, failed services, disk and memory pressure, SELinux and rescue 30 min 15 The disk filled up at 3 a.m.One full disk followed from the alert to a deleted log still held open, fixed safely, and set beside GitLab’s 2017 outage Worked case20 min

Certifications

3 exams

When you have finished the lessons, take the exam course for the certification you want. This course teaches the subject to the depth of the hardest exam below; each exam course adds only what its exam asks on top: the vendor's own names, services and limits, and how the questions are built.

XK0-006 CompTIA Linux+CompTIA · Associate · High Exam course coming
LFCS Linux Foundation Certified SysadminLinux Foundation · Associate · High Exam course coming
EX200 Red Hat Certified System AdministratorRed Hat · Associate · Very High Exam course coming

Sources and credit

61 sources

The chapters and drawings are written by NeuroqAI from these sources. Each lesson lists its own at the end of its chapter, and figures on the pages are taken from them or computed from them.

Linux man-pages (man7.org)30 sourcesman-pages(7)How manual pages are organised into sectionsLessons 1, 3, 5execve(2)How a program replaces the running process, #! lines includedLessons 1, 3, 5, 7, 13hier(7)The directory tree, described on your own machineLesson 2inode(7)What an inode holds, and what a hard link sharesLesson 2path_resolution(7)The order in which the kernel checks permissionsLessons 2, 6find(1)Search the tree by name, size, time and ownerLesson 2sshd_config(5)Locking down the serverLessons 3, 12pipe(7)How pipes work, and their 64 KiB bufferLesson 4passwd(5)The account file, field by fieldLesson 6shadow(5)Password hashes and ageingLesson 6chmod(1)Permission bits in letters and numbersLesson 6acl(5)Access control lists beyond owner, group and otherLesson 6fork(2)How every new process begins as a copyLesson 7signal(7)Every signal and what it does by defaultLesson 7proc(5)The /proc files that ps, top and free readLessons 7, 14, 15sched(7)How the scheduler shares CPU time, and nice valuesLesson 7crontab(5)The five time fields of a cron lineLessons 8, 13lsblk(8)Disks and partitions as a treeLesson 10parted(8)Partitioning with GPTLesson 10fstab(5)What gets mounted where at bootLesson 10lvm(8)Logical volumes that can growLesson 10ip(8)Addresses, links and routesLesson 11ss(8)Which sockets are open and who owns themLesson 11ssh(1)The client: options, config and forwardingLesson 12ssh-keygen(1)Making and managing keysLesson 12journalctl(1)Reading the system journalLesson 14logrotate(8)Keeping logs from filling the diskLessons 14, 15lsof(8)Which process holds which file openLessons 14, 15free(1)Memory in use and memory availableLesson 14journald.conf(5)Capping how much disk the journal may use (SystemMaxUse)Lesson 15
GNU Project5 sourcesGNU Bash Reference ManualExpansions, quoting, redirection and scripting, from the sourceLessons 1, 3, 4, 5, 13GNU Coreutils manualsort, uniq, cut, wc, tr, tee and the other small toolsLessons 3, 4GNU grep manualSearching text with regular expressionsLesson 4GNU sed manualEditing a stream of text line by lineLesson 4The GNU Awk User's GuideFields, patterns and small reportsLesson 4
Red Hat4 sourcesRed Hat Certified System Administrator exam (EX200) objectivesThe tasks the RHCSA exam asks you to do on RHELLessons 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14Managing software with the DNF tool (RHEL)Repositories, modules and updates on RHELLesson 9Managing file systems (RHEL)XFS, ext4, mounting and quotas on RHELLesson 10Using SELinux (RHEL)Contexts, booleans and fixing denialsLesson 14
systemd3 sourcessystemd manual pagesUnits, services, timers, the journal and systemctlLesson 8systemd.serviceHow a service unit is writtenLesson 8systemd.timerScheduled jobs the systemd wayLessons 8, 13
Standards, research and other publishers19 sourcesCompTIA Linux+ (XK0-006) exam objectives · CompTIAThe objectives this course covers for Linux+Lessons 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Linux Foundation Certified System Administrator (LFCS) · The Linux FoundationThe domains of the hands-on LFCS examLessons 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14The Linux Kernel Archives · Linux Kernel OrganizationWhere the kernel itself is publishedLesson 1Ubuntu release cycle · CanonicalLTS releases and their five years of supportLesson 1Install WSL · MicrosoftA real Linux on a Windows computer in one commandLesson 1Filesystem Hierarchy Standard 3.0 · The Linux FoundationWhat belongs in /etc, /var, /usr and the restLesson 2sudoers manual · Sudo projectWho may run what as whomLesson 6chrony documentation · chrony projectKeeping the clock rightLesson 8apt(8) · DebianInstalling and upgrading packages on Debian and UbuntuLesson 9DNF documentation · Fedora ProjectInstalling and upgrading packages on RHEL and FedoraLesson 9Flatpak documentation · FlatpakDesktop apps that bring their own runtimeLesson 9nmcli · NetworkManagerConfiguring connections that survive a rebootLesson 11Netplan documentation · CanonicalNetwork configuration on UbuntuLesson 11firewalld documentation · firewalldZones, services and portsLesson 11nftables wiki · netfilter projectThe packet filter under firewalldLesson 11RFC 4253: The Secure Shell (SSH) Transport Layer Protocol · IETF (RFC Editor)Key exchange and the host keyLesson 12RFC 4252: The Secure Shell (SSH) Authentication Protocol · IETF (RFC Editor)How a key proves who you are without being sentLesson 12ShellCheck · ShellCheckFinds the common mistakes in shell scriptsLesson 13Postmortem of database outage of January 31 · GitLabA night-time delete on the wrong host, and backups that had failed silentlyLesson 15