Change Swap Size

  1. Turn off all running swap processes: swapoff -a
  2. Resize swap fallocate -l 1G /swapfile (change 1G to the gigabyte size you want it to be)
  3. CHMOD swap: chmod 600 /swapfile
  4. Make file usable as swap mkswap /swapfile
  5. Active the swap file swapon /swapfile

To verify your swap size run the following command and you will see the swap size: free -m


Revision #1
Created 2024-03-21 21:39:32 UTC by Ryan
Updated 2025-02-12 01:11:07 UTC by Ryan