Wednesday, December 15, 2021

Linux: Change Swap size


Disable the old swap file:

$ sudo swapoff /swapfile


Create a bigger (8gb) swap file:

$ sudo fallocate -l 8G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile


Enable the new swap file:

$ sudo swapon /swapfile

 

No comments:

 
Get This <