How To: Enable a Swapfile

no swapfile

[code]sudo fallocate -l 8G /swapfile[/code]

Why 8 gigabytes when I have ample RAM and an SSD? Because I never, ever want to worry about it again. I want to be able to open up every app I have and leave them open for a month. You do you and decide how big you want it to be!

[code]sudo chmod 600 /swapfile[/code]

[code]sudo mkswap /swapfile[/code]

And turn it on with:

[code]sudo swapon /swapfile[/code]

[code]sudo nano /etc/fstab[/code]

And add this at the bottom of that document:

[code]/swapfile none swap sw 0 0[/code]