This 5 line script will quickly create a 512MB SWAP file that will be automatically mounted on each machine reboot. It assumes you don’t already have a swap file enabled. The script creates a 512MB file called .swapfile on your root partition, makes it SWAP format and enables it as available system SWAP. An fstab entry
↧