Create swap file in linux

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

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

Tags:#linux#swap


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