Guide to the correct swapfile setup
There is a lot of conflicting information out there on how to create a swapfile correctly. Although these guides (should) all work perfeclty fine, I spent the time to research and find out what is actually the most correct.
In summary: make sure to use the dd
command to create the swapfile, and create
an fstab entry that looks similar to /swapfile none swap sw 0 0
. In this
article, I will go more in-depth into the correct steps to create a swapfile on
Linux, and explain each step.