I know that you can choose to use encryption at the installation setup, but I chose not to this time. How can I use it now?

Thanks! :)

1 Answer 1


You can encrypt your data after installation even though you didn't choose to encrypt it during installation.

To encrypt your entire /home directory and, all it's sub-directories, such as Documents, Downloads, Music, etc. read this link: how-to-encrypt-your-home-folder-after-installing-ubuntu that explains how to encrypt /home after you've installed Ubuntu. There are plenty of screenshots and narrative walking you through the process.

To summarize the link what you need to do is:

  1. Backup your data. Although the migration process uses a working backup you want your own just to be safe.
  2. Install the encryption software with sudo apt-get install ecryptfs-utils cryptsetup.
  3. Create a temporary account with sudo privileges. In order to encrypt your /home directory you can't be logged on as yourself.
  4. Login with temporary account.
  5. Migrate your data from unencrypted /home directory to an encrypted /home directory using the command sudo ecryptfs-migrate-home -u user where "user" is your regular user name.
  6. Please note besides encrypting /home your swap partition can also be encrypted for maximum protection.
  8. Login with your regular user name. A random passphrase can be generated which you need to write down if something goes wrong in
    the future and you need to access /home folder manually.

Some people feel encrypting all of /home is overkill and can be too cumbersome when moving /home to another computer or different drive on the same computer. I tried encryption when I installed Ubuntu for the first time in 2014 but when I messed things up and had to reinstall Ubuntu I skipped the encryption option after reading problems other users encountered (although I never did have encryption problems).

If you don't want to encrypt /home and all the sub-directories. You can have a single encrypted ~/.Private directory where you can keep certain files that need encryption such as "things I don't want the NSA to know" or "wife's surprise birthday party planning". This is described here: EncryptedPrivateDirectory

  • Please include the most important parts of the linked documents into your question.
    – Byte Commander
    Sep 4, 2016 at 0:38
  • @ByteCommander groans ok.. give me a few minutes. Sep 4, 2016 at 0:49
  • @Thomas you are most welcome. Sep 4, 2016 at 1:33
  • @ByteCommander edit is now finished. Thomas finished his encryption before my edit was done. LOL. Sep 4, 2016 at 1:34
  • Can this be done in place or does this require having 2x as much space on your disk as your home drive? Aug 24, 2021 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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