Create swap file in linux

Posted by Carles Loriente on December 26, 2019 · 1 min read

Create a swap file executing the following script.

If you want to automount the swap file on boot, add to /etc/fstab /swapfile swap swap defaults 0 0

Found a snippet that saved your day? Consider dropping a tip!