How to Install and Use VeraCrypt to Encrypt Drives on Ubuntu 18.04

6
12944

Today, we are going to learn about how to install and Use VeraCrypt to Encrypt Drives on Ubuntu 18.04.

So what is VeraCrypt? VeraCrypt is an open-source software forked from TrueCrypt whose development and maintenance has since been discontinued. It is used for performing on-the-fly disk encryption (OTFE). On-the-fly encryption means that data is encrypted before it is written to the disk and when data is being read from the disk, every small portion of it is copied and decrypted on the fly in the memory (RAM) without human interaction i.e no decrypted data is stored on the memory temporarily and thus, even when the disk is mounted, data is still encrypted.

VeraCrypt encrypts the entire filesystem of the disk including folders, files, contents of the files, metadata, free space…In order to access the encrypted data, one has to supply the encryption keys, password or keyfile.

You can read more about VeraCrypt in its Documentation page.

You can also check our previous article on how to Encrypt Files and Folders with eCryptFS on Ubuntu 18.04.

Install VeraCrypt on Ubuntu 18.04

There are two ways in which VeraCrypt can be installed on Ubuntu 18.04

Installing via Ubuntu PPA repos

VeraCrypt is not available on the default Ubuntu repositories. Therefore, to install it using the package manger, you have to add the PPA repositories.

Add PPA repos using the command below. Note that this repository is not related to VeraCrypt even though Unit 193 is Xubuntu developer and he is a great contributor to open source community;

sudo add-apt-repository ppa:unit193/encryption

Update the system

sudo apt-get update

Once the update is done, run the command below to install VeraCrypt.

sudo apt install veracrypt

Install via VeraCrypt Installer Scripts

VeraCrypt has its Linux installer scripts on its official website. Download the installer tarball by running the command below.

wget https://launchpad.net/veracrypt/trunk/1.23/+download/veracrypt-1.23-setup.tar.bz2

Once the download is complete, extract the VeraCrypt tarball, navigate to the source code extract directory and run the VeraCrypt installer.

tar -xjf veracrypt-1.23-setup.tar.bz2

This will extrct the VeraCrypt setup scripts in the current working directory. There are two types of installers, GUI based and the console based Installers for both x86 and x86_64 systems. In this case, I am going to use the console based installer for x86_64 system.

Therefore, in the current working directory, run the installer script as shown below;

sudo ./veracrypt-1.23-setup-console-x64
VeraCrypt 1.23 Setup
____________________


Installation options:

 1) Install veracrypt_1.23_console_amd64.tar.gz
 2) Extract package file veracrypt_1.23_console_amd64.tar.gz and place it to /tmp

To select, enter 1 or 2: 1 << Press 1 to Launch VeraCrypt installation

Before you can use, extract, or install VeraCrypt, you must accept the
terms of the VeraCrypt License.

Press Enter to display the license terms... 


...scroll through the license...

Do you accept and agree to be bound by the license terms? (yes/no): Yes


...Once you press Enter, the installer will run and install VeraCrypt...
usr/share/veracrypt/doc/HTML/VeraCrypt Rescue Disk.html
usr/share/veracrypt/doc/HTML/VeraCrypt128x128.png
usr/bin/
usr/bin/veracrypt-uninstall.sh
usr/bin/veracrypt

Press Enter to exit...

You can verify that VeraCrypt is installed and indeed is in your PATH.

 which veracrypt
/usr/bin/veracrypt

You are now ready to encrypt your drives/files using VeraCrypt.

Use VeraCrypt to Encrypt Drives on Ubuntu 18.04

In this guide, we are going to learn how to use the GUI method of VeraCrypt to encrypt devices/files.

To launch the VeraCrypt GUI, press the Super Key to launch activities search bar and type veracrypt.

Use veracrypt to encrypt drives on Ubuntu 18.04

Press Enter to Launch VeraCrypt

use veracrypt to encrypt drives on Ubuntu 18.04

The numbered slots, 1, 2… are used by VeraCrypt to manage encrypted devices.

Create VeraCrypt Volume

There are two types of VeraCrypt Volumes;

  • File-hosted (container)
  • Partition/device-hosted

File-hosted volume is a normal file that can be stored on any storage device. It contains an independent encrypted virtual disk device while Partition hosted volume is a hard drive partition. It can be a removable USB sticks or any other type of storage.

To create a VeraCrypt volume, click on the Create Volume button. You will be prompted to choose the type of the volume, File Container or a Partition. In this guide, we are going to create an encrypted partition. If you opt to create an encrypted file container, the process it the same.

6 COMMENTS

  1. i installed veracrypt successfully in Ubuntu 18.04 but coundn’t launch it by clicking on icon. even after reboot couldn’t do it. I have Ububtu 18.04 with LUKS Encryption.

    Please comment.

    Thanks

    Chetan

    • I ran into a similar issue on 19.04, try running veracrypt from the commandline by typing in “veracrypt” … if it returns: “veracrypt: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory”
      … then you’re in good luck because you only need to install “libgtk2.0-0” (sudo apt install libgtk2.0-0) and it will mostly work 🙂 (from cmd or icon).

    • Hi.
      We haven’t tested this on Ubuntu 14.10.
      However, if you have a test VM of Ubuntu 14.04, please feel free to test and give us feedback.

  2. I’ve been trying to get this to work on 19.04 and couldn’t do it, nothing would happen as had been described here so I tried opening n command line as was described above, and got the exact same error as was decribed above and I installed the missing file as described above and now its FINALLY working , THANKOU for making that comment, indeed, it helped somebody (well, the software at last came up, haven’t yet tried encrypting or decrypting anything yet….I’m curious which is more secure for an OS enncryption, the LUX that encrupts my Ubuntor the verracrypt I use to encrypt windows 10? I acrtually just wanted veracrypt on both so hopefully I can read USBs encrypted with it on either system…thanks again.

LEAVE A REPLY

Please enter your comment!
Please enter your name here