How to Encrypt Volumes in Ubuntu

Create an encrypted partition in Ubuntu with Encrypted Private Directory.

Create an encrypted partition in Ubuntu with Encrypted Private Directory.

Martin Poole/Stockbyte/Getty Images

by Contributing Writer

The Ubuntu operating system is installed with tools that will enable you to encrypt volumes. Though you can obtain proprietary tools, such as TrueCrypt and LUKS, to encrypt partitions, the Ubuntu operating system includes the Encrypted Private Directory tool by default. You simply need to update and enable the tool to use it. When you create an encrypted volume in Ubuntu, the volume is given the name of “~/.Private.” You assign a passphrase when the volume is created, and you will use the passphrase to view or copy files to and from the encrypted directory.

Step 1

Open a Terminal window in Ubuntu. To open a Terminal window, click the “Applications” option in the top navigation bar. Click the “Accessories” link, and then click “Terminal.” The Terminal window launches.

Step 2

Type the following command at the command prompt, and then press the “Enter” key: sudo apt-get install ecryptfs-utils  This command updates the system with the newest version of the tool and then automatically installs the tool.

Step 3

Type the following command at the command prompt and press the “Enter” key: ecryptfs-setup-private  This command runs the setup routine to create the private partition and protect the partition with a passphrase. A prompt to enter the passphrase appears.

Step 4

Type the desired passphrase at the prompt, and then press the “Enter” key. Record the passphrase, as you will need to enter it each time you access the private partition.

Step 5

Press the “Ctrl,” “Alt” and “Del” buttons together. The Logout dialog box opens.

Step 6

Log out of Ubuntu, and then log back in. The encrypted volume is created at "~/.Private."

About the Author

Randall Blackburn has worked for several Fortune 1000 companies as a technical writer over the past seven years. He has produced a wide variety of technical documentation, including detailed programming specifications and research papers. Randall has also acquired several years' experience writing web content. Randall lives and works in Austin, TX.

Photo Credits

  • Martin Poole/Stockbyte/Getty Images