Skip to content
[Docs](https://averagelinuxuser.com/linux-swap/G)
  • A partition or a file on a hard drive that helps to allocate temp memory when ram i exhaust

  • Check the size of the swap with swapon

To create a swap file 1. Create the file

sudo fallocater -l 1G /swapfile
  1. Change permissions to 600
  2. change file to the swapfile
sudo mkswap /swapfile;
swapon /swapfile
  1. edit the [[Automatic Mounting fstab|fstab]]

proc - The default is 60 but commended is 10

/proc/sys/vm/swappiness

#etc
  • To change it edit /etc/[[sysctl|sysctl.conf]]

[!tip]- Swap Recommended size Pasted_image_20240512205138.png