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).
Asked
Active
Viewed 6.7k times
54
2 Answers
69
Open terminal and type ls -A /home
. There should be a .ecryptfs
folder, if you have encryption of your home folder.

Martin Ueding
- 8,348
-
1Thanks. That's exactly what I needed. I do have .ecryptfs folder. So my home folder is encrypted. – Neptunno Jun 04 '12 at 21:08
-
Also there is a related question regarding swap partition, http://askubuntu.com/questions/53242/check-if-partition-is-encrypted My swap is encrypted as well. – Neptunno Jun 04 '12 at 21:09
-
9...so Eve's
mkdir ~/.ecryptfs
(ortar 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 '15 at 13:29 -
1@Iserni: Indeed! I think one should rather look through
mount
then. I haven't thought about that before. – Martin Ueding May 09 '16 at 15:53 -
You do not want to list contents of the current directory, so please exclude the
.
from the command. – jarno May 08 '19 at 12:37 -
@jarno: I think the formatting was just wrong and that it should be the period in the sentence. I have fixed that. – Martin Ueding May 09 '19 at 09:55
-
to check your home you could also do
mount | grep /home
and you'll get something like/home/.ecryptfs/your-username/.Private on /home/your-username type ecryptfs ...
– Rodrigo Oct 07 '20 at 16:05
18
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.

Jorge Castro
- 71,754

Neptunno
- 2,214
-
1What if I see both
/dev/mapper/cryptswap1
and a usual drive in the output? – Magnus Teekivi Nov 30 '17 at 08:14
ecryptfs-unwrap-passphrase
orecryptfs-unwrap-passphrase /path/to/wrapped-passphrase
(if the automatically created "wrapped-passphrase" file had not been deleted), see http://manpages.ubuntu.com/manpages/natty/man1/ecryptfs-unwrap-passphrase.1.html.NB: When
– lmeurs Aug 24 '15 at 12:08ecryptfs-unwrap-passphrase
asks for your passphrase, enter the user's password.