I installed Ubuntu 12.04 a few days ago but strangely I seem to have skipped the part about choosing to encrypt home folder. Now if it is encrypted I do not know what is the encryption key. How do I check if it is really encrypted? (and also the swap partition).

  • 1
    related question -> askubuntu.com/questions/17216/…
    – hhlp
    Jun 4, 2012 at 20:56
  • You probably could have recovered the passphrase using ecryptfs-unwrap-passphrase or ecryptfs-unwrap-passphrase /path/to/wrapped-passphrase (if the automatically created "wrapped-passphrase" file had not been deleted), see manpages.ubuntu.com/manpages/natty/man1/…. NB: When ecryptfs-unwrap-passphrase asks for your passphrase, enter the user's password.
    – lmeurs
    Aug 24, 2015 at 12:08

2 Answers 2


Open terminal and type ls -A /home. There should be a .ecryptfs folder, if you have encryption of your home folder.

  • 1
    Thanks. That's exactly what I needed. I do have .ecryptfs folder. So my home folder is encrypted.
    – Neptunno
    Jun 4, 2012 at 21:08
  • Also there is a related question regarding swap partition, askubuntu.com/questions/53242/check-if-partition-is-encrypted My swap is encrypted as well.
    – Neptunno
    Jun 4, 2012 at 21:09
  • 9
    ...so Eve's mkdir ~/.ecryptfs (or tar xf files-expected-on-an-encrypted-home.tgz) would make Alice believe her home is safely encrypted, while it actually isn't?
    – LSerni
    Apr 20, 2015 at 13:29
  • 1
    @Iserni: Indeed! I think one should rather look through mount then. I haven't thought about that before. May 9, 2016 at 15:53
  • You do not want to list contents of the current directory, so please exclude the ` .` from the command.
    – jarno
    May 8, 2019 at 12:37

This is how to check if swap partition is encrypted:

sudo blkid | grep swap

and should check for an output similar to

/dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap"

If instead of cryptswap1 there is something like a usual drive (e.g. /dev/sda4) then swap area is not encrypted.

  • 1
    What if I see both /dev/mapper/cryptswap1 and a usual drive in the output? Nov 30, 2017 at 8:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.