1. Create file
fallocate -l 2G /swapfile
chmod 600 /swapfile
2. Enable
mkswap /swapfile
swapon /swapfile
3. Persist
Add to /etc/fstab:
/swapfile none swap sw 0 0
4. Verify
swapon -s
Quick checklist
[ ] Steps completed
[ ] Config updated
[ ] Service tested
[ ] Restart/rollback ready
[ ] Logs checked