Ubuntu – Have Swap Files Been Used on Ubuntu Prior to 17.04

swap

With the release of Ubuntu 18.04 (and 17.04) the swap partition will be replaced with a swap file. Has this been the case with previous Ubuntu releases?

I ask this because I've found several mentions of this term, "swap file" dated from 2011-2015 here on askubuntu, notably this post How do I configure swappiness?, but it's not clear if they are just using loose terminology referring to the swap partition (calling it a file), or if they mean an actual swap file.

Best Answer

  • File or partition, vm.swappiness affects swap as a whole. It doesn't matter where the swap area comes from (so the post could say simply "swap area"). Swap files were usable for years before Ubuntu ever existed. And Ubuntu has always used a swap partition by default until 17.04. Switching to swap files when installing has been proposed multiple times, but never implemented till now.

  • Related Question