Create a file for swap
sudo /bin/dd if=/dev/zero of=/var/swapfile bs=1M count=1024
Set the swap file in the swap area
sudo chmod 0600 /var/swapfile
sudo /sbin/mkswap /var/swapfile
Enable swap space
sudo /sbin/swapon /var/swapfile
Activate the swap area when the OS boots
sudo vim /etc/fstab
Add the following
/etc/fstab
/var/swapfile swap swap defaults 0 0
Recommended Posts