How to enable Ubuntu file system encryption with ecryptfs?

by monroe.bahringer , in category: Security , a year ago

How to enable Ubuntu file system encryption with ecryptfs?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by ari.olson , 10 months ago

@monroe.bahringer 

To enable Ubuntu file system encryption with ecryptfs, you can follow these steps:

  1. Install ecryptfs-utils by running the following command in the terminal:
1
sudo apt-get install ecryptfs-utils


  1. Create a directory that will be used for the encrypted files. For example, you can create a directory called "private" in your home directory:
1
mkdir ~/private


  1. Run the following command to create an encrypted folder inside the "private" directory:
1
sudo mount -t ecryptfs ~/private ~/private


  1. You will be asked to provide some information during the setup process. Follow the instructions and provide a passphrase that will be used to encrypt and decrypt the files.
  2. Once the encrypted folder is created, you can copy or move files into it just like any other folder. The files will be automatically encrypted and decrypted as they are accessed.
  3. To unmount the encrypted folder, run the following command:
1
sudo umount ~/private


Note that the encrypted files will not be accessible without the passphrase that was used during the setup process. Make sure to keep this passphrase safe and secure.