Well, I obtained the UUID of my idle linux-swap
formatted partition from gparted, then:
- Made a backup of /etc/fstab
- Edited
/etc/fstab
to include the line:
UUID=999990-999-999-9999-999 none swap sw 0 0
Of course you'll need to replace the 9's with your carefully determined UUID of your intended swap partition.
sudo swapon --all --verbose
I think you really want to use the UUID even though you could go by partition name and stuff, because the names can easily change such as maybe when you add or reposition drives inside your machine.
The last command seems to correctly detect my swap partition, and htop now shows the size of the partition, hurray!
You may also want to get to know your swappiness value, which you can easily do following the swappiness section in these docs, while at it, even though you'd typically not find any surprises there nor have real reason to change it.
Even though this seems working, please do not follow these steps before few upvotes from other people have shown up aside my answer, I've only performed this once thus far.
sudo fallocate -l 1G /swapfile && sudo mkswap /swapfile
? – Rinzwind Jan 24 '18 at 14:31