Because you may be just a *little* lazy, we wrote a little script to set up a swap partition, enable it and set it up to be permanent! It’s currently working on Ubuntu (I haven’t tested it on anything else yet). Here’s the code:

If you want to download it, you can from here – or, you can download and run it at the same time with the following command:

wget -O && sudo bash

Do note that you should absolutely not trust a random guy on the internet (which I am) – that code could just as easily have been rm -rf / 🙂

(you’re probably going to want to run it as root)

Have fun!