back to labs
Persistent Swap File
EasyRHCSA Prep15 minThe brief
This host has no swap. Add a file-backed swap area that comes back after a reboot: create /swap.img (64 MB is plenty for this exercise), lock it to mode 0600 (swap must not be world-readable), format it with mkswap, and add an /etc/fstab entry so it activates at every boot. Grading reads the persistent facts — the formatted swap file and the fstab entry — the parts that survive a reboot. (You can activate it live with swapon /swap.img if you want to see it work — confirm with cat /proc/swaps, not swapon --show, which this sandbox's swapon shim doesn't accept. Either way the durable config is what's graded.)
What you'll do
- Create /swap.img at mode 0600
- Format it as swap with mkswap
- Add an /etc/fstab entry so it activates on boot
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
