I needed some more swap for something I'm doing so I set up a swap file rather than editing partitions.
Are there any disadvantages to using a swap file instead of a swap partition?
My OS is Debian Linux.
The main disadvantage is that you won't be able to hibernate.
Having said that, I should admit that I have seen that it is possible, but the procedure looks very dodgy to me, because it involves using the absolute disc address of the swap file. If the swap file moves, the kernel will hibernate all over the files that now occupy the space where the swap file was. I won't touch it, hence my rather dogmatic first sentence.
There are two main advantages:-
I have used both on Ubuntu. I would recommend a swap file if you don't need hibernation.