XK0-006 cheat sheet: Linux+ quick reference
Last-minute reference for XK0-006, the CompTIA Linux+ V8 exam. System Management and Troubleshooting are the largest domains; read the exam as a series of practical situations.
Exam facts
| Item | Value |
|---|---|
| Questions | Maximum of 90, multiple-choice and performance-based |
| Time | 90 minutes |
| Passing score | 720 on 100-900 |
| Domains | 23 / 20 / 18 / 17 / 22 |
Storage
- Grow order: extend the logical volume, then grow the filesystem. xfs: xfs_growfs. ext4: resize2fs. xfs cannot be shrunk.
- LVM layers: pv (pvcreate), vg (vgcreate, vgextend), lv (lvcreate, lvextend).
- fstab options: nofail (continue boot), noexec, nosuid, nodev, noatime, ro.
- No space but free blocks: check inodes with df -i.
- mdadm and /proc/mdstat for software RAID.
Network
| Task | Tool |
|---|---|
| Addresses, links, routes | ip address, ip link, ip route |
| Listening ports | ss |
| DNS lookup | dig, nslookup |
| Path and loss | traceroute, mtr |
| Packet capture | tcpdump |
| Interface config | nmcli, Netplan (apply, try) |
Fault order: link, address, gateway, route, DNS, firewall.
Processes and systemd
- Signals: 1 HUP, 9 KILL (cannot be caught), 15 TERM (default).
- nice and renice for priority; Ctrl+z, bg, fg, jobs, nohup.
- systemctl: start, stop, restart, reload, enable, disable, mask, unmask, status, daemon-reload.
- enable is for boot, start is for now, mask blocks both.
Security
| Topic | Remember |
|---|---|
| firewalld | Runtime versus permanent; zones; services versus ports |
| sudo | Edit with visudo; /etc/sudoers.d; NOPASSWD implications |
| Special bits | setuid, setgid (directory group inheritance), sticky bit |
| SELinux | enforcing, permissive, disabled; semanage and restorecon; ls -Z |
| SSH | PermitRootLogin, AllowUsers, key versus password |
| Crypto | LUKS2 for disks, GPG for files, TLS and OpenSSL in transit |
| Audit | AIDE for file integrity, OpenSCAP and CIS Benchmarks |
Scripting and tools
- $? is the last exit status; 0 is success.
- Numeric tests: -eq, -ne, -gt, -lt, -ge, -le. String tests: =, !=, -z, -n.
- Command substitution is $(command).
- Ansible: agentless, SSH, playbooks and inventory. Puppet: agent model by default. Kickstart and cloud-init: unattended install.
- Git: fetch downloads; pull fetches and merges.
- AI output: review and verify before use; protect sensitive data; follow policy.
Boot, devices and files
- Boot order: firmware, bootloader, kernel with parameters, initrd, init. dracut rebuilds the initrd; PXE boots over the network.
- modprobe loads a module with dependencies; insmod loads one file; lsmod lists; modinfo describes; rmmod removes.
- Hardware views: lscpu, lsmem, lspci, lsusb, lshw, dmidecode, dmesg.
- Hard links share an inode and cannot cross filesystems; symbolic links store a path and can dangle.
- Archive and copy: tar, cpio, rsync (differences only), dd (blocks), ddrescue (failing disks).
Accounts
- Files: /etc/passwd, /etc/shadow, /etc/group; defaults from /etc/skel.
- usermod -L locks, chage manages ageing, nologin and rbash restrict shells.
- Account hardening: complexity, length, expiry, history, MFA, avoid running as root.
Common traps
- Using resize2fs on an xfs filesystem.
- Forgetting daemon-reload after editing a unit file.
- Setting chmod 777 when a SELinux context is the problem.
- Confusing runtime and permanent firewall changes.
- Reading high load average as high CPU when I/O wait is the cause.
More explanation is in the domain pages, starting with system management. Practise with the practice test.