Is the swap partition encrypted?

Selecting the encryption option at install time to encrypt the home partition. Does this enable encryption of the swap partition or is the swap partition unencrypted. If the swap partition is unencrypted, how do I encrypt the swap and home partitions.


By default, selecting the “Encrypt my home directory” option at install time will encrypt your swap space¹ as well - at least in Ubuntu 10.04 and newer (I don't know when this was implemented, so it could well be earlier).

Technically, it uses the ecryptfs-setup-swap program to do the swap encryption. You can use this tool if you want to encrypt your swap space post-install.

¹: This applies to both swap partitions and any swap files you may have set up.


No, data written to the swap partition is done so in cleartext. If you're looking to encrypt your swap partition, then you may find dm-crypt useful. This article talks about applying dm-crypt to the swap area.


No, only the /home partition is encrypted. If you want more, you should use LUKS. See also Ubuntu help on encrypted fileystems.