sudo apt-get install gparted && sudo gparted
Then make yourself your swap partition (using these steps), save, exit, and be relieved that you have easy access to as partition editor.
Go to the choice tab in the top right, and choose the drive you want the swap on.
If the device isn't already partitioned, go to Device -> Create Partition table -> Make FileSystem Type "EXT4" and make the memory Close to all of it (I'd say 93%.) Now save this and proceed.
Now create another partition from that, make the FileSystem type "Swap" Make it use the rest of the memory, and save. DO NOT DO THIS IF THIS IS THE BOOT DRIVE. IF THIS IS THE BOOT DRIVE, TELL ME.
If the device is already partitioned and you need to re partition it, just remove all partitions, and start from scratch. (Follow step 3)
sudo apt-get install gedit && sudo gedit /etc/fstab
You will see a line all the way at the bottom that looks like this:
/dev/sda1 /home ext4 defaults 0 0
Now make new lines copying this format for the partitions you just made. The only thing you will have to change is the FileSystem, the mount point, and the options. For example my swap line looks like this:
/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
After that, save and exit.
The next step is crucially important to use root.
If whoami doesn't return root you've done something wrong, and you need to do
Into the terminal. THIS SHOULD NOT RETURN ANYTHING, IF IT DOES, STOP, AND LEAVE A COMMENT
If it didn't return any lines, do
When your computer boots back on, do free -m.
You should see something like
Swap: 8043 0 8043
If you see that, you're done! If not, go back and do everything again.