Operating Systems – Is Swapping Enabled by Default?

linuxosxswapwindows

As a result of this question, I was a bit confused.

After some research I found that swapping is enabled by default on Mac OS X. Swapping was furthermore introduced in Windows 3.0, so I believe it is also enabled by default. Is this correct?

Is swapping in general disabled on common Linux distributions, e.g. Ubuntu?

Best Answer

Most OS installers including the Ubuntu/Debian installer will create and enable a swap partition if you select all of the default options in the installer, in particular if you use automatic/guided partitioning.

If you use manual partitioning at installation time or if you retain the partition table that already exists on the disk, then it's up to you whether you create a swap partition or not. If you create one and/or designate one, the installer will most likely enable it.

You can check /etc/fstab to see if a swap partition is configured. Look for an entry with type swap. If there is one configured, it should get enabled at boot time. Check /proc/swaps to see if it is really enabled.

Related Question