Linux
Logs, packages, disk space and services on Linux servers and desktops.
20 Articles
Built-in tools
- UFW (Uncomplicated Firewall)How UFW manages the Linux firewall on Ubuntu, how to allow SSH before enabling it, and how to list and delete rules.
Command-line tools
- apt autoremoveWhat apt autoremove removes, why packages become 'no longer required', and how to check the list before removing anything.
- df (disk free)How to read df output, why Use% can reach 100% before Avail is zero for normal users, and how to check inodes with df -i.
- Disk usage with du and ncduHow to find what fills a Linux disk with du and the interactive ncdu, with options that stay on one file system.
- File permissions: chmod and chownHow Linux read, write and execute permissions work, what 755 and 644 mean, and how to change owner and mode safely.
- Finding large and old files with findHow to use find to list big or old files on Linux, preview them safely and delete only what you checked.
- journalctl and the systemd journalHow to read logs with journalctl, check how much space the journal uses and shrink it safely with --vacuum options.
- lsblk and block devicesHow to list disks and partitions with lsblk, read sizes, file systems and mount points, and identify a new disk safely.
- rsyncHow rsync copies and synchronises files, what the trailing slash changes, and how to test with --dry-run before --delete.
Concepts
- Inodes and 'No space left on device'What an inode is, how to see inode usage with df -i, and how to find directories with millions of small files.
- Load averageWhat the three load average numbers mean, how they relate to CPU cores, and when a high load is a problem.
- OOM killerWhat the Linux out-of-memory killer does, how to find out which process it killed, and how to make it less likely.
- SSH keysHow SSH key authentication works, how to create a key with ssh-keygen, install it on a server and protect it.
- Swap space on LinuxWhat swap is, how to see it with free and swapon, how to add a swap file, and what vm.swappiness changes.
Configuration files
- /etc/fstabWhat each field of /etc/fstab means, why UUIDs are used, and how to test a new entry before rebooting.
Services
- cron and crontabHow cron runs scheduled jobs, the five crontab time fields, where system cron files live and how systemd timers compare.
- logrotateWhat logrotate does, how its configuration in /etc/logrotate.conf and /etc/logrotate.d works, and how to test a rule safely.
- systemd units and systemctlWhat a systemd unit is, the common unit types, and how to start, stop, enable and inspect services with systemctl.
System folders
- /tmp and temporary filesWhat /tmp and /var/tmp are for, when Linux cleans them, and how systemd-tmpfiles controls their age limits.
- APT package cache (apt clean and autoclean)Where APT keeps downloaded .deb files, how apt clean, autoclean and autoremove differ, and what is safe to remove on Debian and Ubuntu.