ubuntu, updated

Start here: Ubuntu Server & Linux cheat sheets

Cheat sheets and short guides for running Ubuntu Server, most of them useful on any Linux. What's in here, who it's for, and where to find what.

What this is

A collection of cheat sheets and short guides for running a Linux server. It is not a manual and not a course. Every page answers one question in a few minutes, so you can get going quickly or look up the command you forgot.

Most pages have the same shape:

Just need the command? Jump to the cheat sheet with the table of contents on the right. Want to understand the topic? The concept pages (like how disks, partitions and volumes fit together) explain the basics briefly.

Who it’s for

IT admins who can already log in, move around the shell and edit a file, but don’t work with Linux every day. You don’t want to read a hundred lines to change an IP or grow a disk.

Ubuntu or Linux in general?

Everything is written and tested for Ubuntu Server 22.04 and 24.04 LTS and newer. Most of it works on any Linux, because the shell, the tools and the core concepts are the same everywhere. Where Ubuntu does its own thing, the page says so.

Applies toTopics
Any LinuxShell and terminal, everyday commands, permissions, LVM and file systems, systemd services and journal, cron, Bash scripting, and all tools (vim, git, ssh, curl, jq, find, sed/awk, tmux…)
Ubuntu / DebianPackages (apt), adduser/deluser, the sudo group, ufw, log file names like /var/log/auth.log
Ubuntu specificNetwork config with Netplan, the installer’s default LVM layout, cloud-init defaults

On Red Hat-based systems (RHEL, Rocky, Alma) the differences are mostly dnf instead of apt, the group wheel instead of sudo, firewalld instead of ufw, NetworkManager (nmcli) instead of Netplan, and /var/log/secure instead of auth.log.

Where to find what

SectionWhat’s inside
Core Concepts And Tipssudo, getting help, everyday commands (ls, grep, tar), terminal shortcuts, shell history, pipes and operators, “everything is a file”, the folder layout, packages and updates
Disks And VolumesHow disks, partitions, LVM and file systems fit together. List, create, delete, mount and extend them. File systems compared. Find and free space when a disk is full.
NetworkingNetplan, IP address, gateway and routes, DNS, and network troubleshooting
User ManagementUsers, groups, file permissions, ACLs and best practices
Logs And DebuggingWhere the logs are, how to search them, login problems, slow boots, and journalctl in depth
Services And CronjobsCheck, start and autostart services, cronjobs, and the “task manager” for CPU, RAM and disk
AutomationBash scripting basics, best practices, and a complete example script
Tools And UtilitiesCheat sheets for vim, xargs, find, sed and awk, git, curl, jq, ssh, tmux, and lsof/ss/ncdu

I just need to…

TaskPage
Run a command as rootWho is sudo?
Find a command I forgotStuck? Where to get help
Extract a .tar.gzEveryday commands
See all disks and free spaceList disks and volumes
Extend a disk or volumeExtend a disk or volume
Disk is full, find out whyDisk full: find and free space
Add and mount a new diskPartitions and Format and mount
Change the IP addressChange IP, gateway and routes
Change the DNS serverWhere are the DNS settings?
Create a user and give admin rightsUsers
Fix “Permission denied”How permissions work
Set up a shared folder for a teamPermission best practices
Find the right logWhere are the logs?
Find out why someone can’t log inDebugging login problems
Find out why the boot is slowSlow boot? systemd-analyze
Check if a service runs, enable autostartServices
Schedule a jobCronjobs
See what eats CPU or RAMTask manager
Write a scriptBash scripting basics
Edit a file in vim (and get out again)Vim: survival basics
Find files by name, age or sizefind
Replace text in many filessed and awk
Run a command for many filesxargs snippets
Keep a job running when SSH dropstmux
Find which process uses a portlsof, ss and ncdu
Test a website or APIcurl

Conventions

Warning: Commands on the disk pages can destroy data. Read the device name twice before you press Enter, and have a backup or snapshot.

§ home
~/knubertus/home/
1,1 Top