Have you ever make mistake with size of your swap file during linux installation ? Good news is that size can be resized.
This article is written after successful usage of tutorial mentioned here : https://askubuntu.com/questions/178712/how-to-increase-swap-space
First at all you can check where your swap file is located.
In first column you can find path to your swap file. So let’s go …
- Turn off your swap
sudo swapoff -a
- Create an empty swapfile ( next command will create 8G swap file
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
- If your swap file was already created, you probably have correct permissions on file. But to be sure adjust permissions
sudo chmod 0600 /swapfile
- Set up a Linux swap area
sudo mkswap /swapfile
- Turn the swap on
sudo swapon /swapfile
And that should be it. Check your swap size with command