Increase swap space on linux ubuntu

Follow this steps to increase swap space on linux ubuntu :

  1. $ sudo swapoff /swapfile
  2. $ sudo fallocate -l 4G /swapfile
  3. $ chmod 600 /swapfile
  4. $ sudo mkswap /swapfile
  5. $ sudo swapon /swapfile
  6. $ sudo swapon -s

Scroll to Top
%d bloggers like this: