1. Create a file to use as swap.
sudo fallocate -l 4G /swapfile
2. Change the permissions of the file.
sudo chmod 600 /swapfile
3. We have to tell the system that this file will be for the swap.
sudo mkswap /swapfile
4. Activate the swap file.
sudo swapon /swapfile
5. Edit the file /etc/fstab.
sudo pluma /etc/fstab
6. Add the below entry to the end of the file.
/swapfile swap swap defaults 0 0
No comments
Post a Comment