{"id":1237,"date":"2018-11-03T14:23:43","date_gmt":"2018-11-03T11:23:43","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1237"},"modified":"2024-03-11T21:38:53","modified_gmt":"2024-03-11T18:38:53","slug":"how-to-install-and-use-veracrypt-to-encrypt-drives-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-and-use-veracrypt-to-encrypt-drives-on-ubuntu-18-04\/","title":{"rendered":"How to Install and Use VeraCrypt to Encrypt Drives on Ubuntu"},"content":{"rendered":"\n
Today, we are going to learn about how to install and use VeraCrypt to encrypt Drives on Ubuntu 18.04. 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.<\/p>\n\n\n\n
You can read more about VeraCrypt in its Documentation<\/a> page.<\/p>\n\n\n\n There are two ways in which VeraCrypt can be installed on Ubuntu;<\/p>\n\n\n\n VeraCrypt provide installer scripts on their downloads page<\/a> which makes the install as easy.<\/p>\n\n\n\n Download either the generic installer from the downloads page by following the link provided above.<\/p>\n\n\n\n You can simply get the link and download using wget or curl commands;<\/p>\n\n\n\n Extract the installer once the download is completed;<\/p>\n\n\n\n Similarly, there are two types of installers, GUI based<\/strong> and the console based<\/strong> Installers for both x86 and x86_64 systems that are extracted to the current working directory.<\/p>\n\n\n\n You can choose which one to use for installation;<\/p>\n\n\n\n Example of using GUI based installer;<\/p>\n\n\n\n Click Install VeraCrypt<\/strong> in the installation wizard that pops up, accept the End User License Agreement and click Ok to install VeraCrypt.<\/p>\n\n\n\n If you want to use the console installer, then execute the command;<\/p>\n\n\n\n Follow the installation prompts to install VeraCrypt on Ubuntu 18.04.<\/p>\n\n\n\n VeraCrypt has various Linux distributions binary installer on the downloads page link given above.<\/p>\n\n\n\n Download the installer of your specific OS distro. For example, we are using Ubuntu 18.04 in this example setup.<\/p>\n\n\n\n You can download the GUI installer;<\/p>\n\n\n\n Or you can download console installer;<\/p>\n\n\n\n Depending on the installer type you downloaded, install VeraCrypt on Ubuntu 18.04 using the command below;<\/p>\n\n\n\n Or;<\/p>\n\n\n\n You can verify that VeraCrypt is installed and indeed is in your PATH.<\/p>\n\n\n\n You are now ready to encrypt your drives\/files using VeraCrypt.<\/p>\n\n\n\n In this guide, we are going to learn how to use the GUI method of VeraCrypt to encrypt devices\/files.<\/p>\n\n\n\n To launch the VeraCrypt GUI, press the Super Key to launch activities search bar and type veracrypt.<\/p>\n\n\n\n Press Enter to Launch VeraCrypt<\/p>\n\n\n\n The numbered slots, 1, 2… are used by VeraCrypt to manage encrypted devices.<\/p>\n\n\n\n There are two types of VeraCrypt Volumes;<\/p>\n\n\n\n To create a VeraCrypt volume select a random slot and click on the Create Volume<\/strong> button. You will be prompted to choose the type of the volume, File Container or a Partition.<\/p>\n\n\n\n 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.<\/p>\n\n\n\n Click Next<\/strong> to select the type of VeraCrypt volume to create, standard or hidden.<\/p>\n\n\n\n In this guide, we are going to create an Hidden volume.<\/p>\n\n\n\n In the next screen, you need to select the drive to encrypt.<\/p>\n\n\n\n CAUTION: If you are encrypting a partition, ensure that there is no data in it or the data has been backed up and backup confirmed. The process will wipe the partition clean and you will all data, if any was stored in it.<\/strong><\/p>\n\n\n\n Note that I have unused partition, Confirm that you are ready to encrypt the drive to continue. You maybe prompted to enter your system admin password before you can proceed.<\/p>\n\n\n\n Next, you are required to select the encryption as well as the hashing algorithms. We are going with the defaults, AES and SHA512.<\/p>\n\n\n\n Click Next<\/strong> to proceed. On the next page, set the password for outer encrypted volume.<\/p>\n\n\n\n On the next page, set the volume Filesystem type. We choose Linux Ext4 in this setup.<\/p>\n\n\n\n Choose which platform to mount the volume. For our case, we will only use Linux.<\/p>\n\n\n\n Next, you need to generate random numbers that will be used to strong encryption keys. The randomness is collected from the mouse movements within the volume creation wizard<\/strong>. The faster the mouse moves, the faster the random numbers are generated. Make sure the bar is filled before you proceed.<\/p>\n\n\n\n Once done, click Format<\/strong> and select yes<\/strong> to confirm that you want to format the drive.<\/p>\n\n\n\n After that format the drive. If everything is well, then you should see a screen confirming that the hidden VeraCrypt volume has been successfully created and mounted on \/media\/veracrypt1<\/strong>.<\/p>\n\n\n You can go ahead and create a hidden volume within the Outer volume created above. You can store your really really sensitive data within the inner hidden volume.<\/p>\n\n\n\n So before you can close the volume creation wizard, click Next > then Next<\/strong>.<\/p>\n\n\n\n Go through the same procedure above;<\/p>\n\n\n\n You can now close the wizard. This will unmount the volumes automatically.<\/p>\n\n\n\n To mount the Outer hidden volume;<\/p>\n\n\n\n To mount the VeraCrypt Inner hidden volume;<\/p>\n\n\n\n For example, I mounted my inner hidden volume on slot 7;<\/p>\n\n\n\n Feel free to explore more about this awesome encryption tool.<\/p>\n\n\n\n Read more on VeraCrypt Documentation<\/a><\/p>\n\n\n\n How to use VeraCrypt on command line interface to encrypt files and directories<\/a>.<\/p>\n\n\n\n Install and Setup VeraCrypt on Ubuntu 20.04<\/a><\/p>\n\n\n\n How to Encrypt Files and Folders with eCryptFS on Ubuntu 18.04<\/a><\/p>\n\n\n\nInstall and Use VeraCrypt to Encrypt Drives on Ubuntu<\/h2>\n\n\n\n
\n
Install VeraCrypt via the Generic Installers<\/h3>\n\n\n\n
wget https:\/\/launchpad.net\/veracrypt\/trunk\/1.25.9\/+download\/veracrypt-1.25.9-setup.tar.bz2<\/code><\/pre>\n\n\n\n
tar xjf veracrypt-1.25.9-setup.tar.bz2<\/code><\/pre>\n\n\n\n
ls -1 veracrypt*<\/code><\/pre>\n\n\n\n
veracrypt-1.25.9-setup-console-x64\nveracrypt-1.25.9-setup-console-x86\nveracrypt-1.25.9-setup-gtk3-console-x64\nveracrypt-1.25.9-setup-gtk3-gui-x64\nveracrypt-1.25.9-setup-gui-x64\nveracrypt-1.25.9-setup-gui-x86\nveracrypt-1.25.9-setup.tar.bz2\n<\/code><\/pre>\n\n\n\n
sudo .\/veracrypt-1.25.9-setup-gui-x64<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
sudo .\/veracrypt-1.25.9-setup-console-x64<\/code><\/pre>\n\n\n\n
Install via Specific OS distribution Binary Package<\/h3>\n\n\n\n
wget https:\/\/launchpad.net\/veracrypt\/trunk\/1.25.9\/+download\/veracrypt-1.25.9-Ubuntu-18.04-amd64.deb<\/code><\/pre>\n\n\n\n
wget https:\/\/launchpad.net\/veracrypt\/trunk\/1.25.9\/+download\/veracrypt-console-1.25.9-Ubuntu-18.04-amd64.deb<\/code><\/pre>\n\n\n\n
sudo apt install .\/veracrypt-1.25.9-Ubuntu-18.04-amd64.deb<\/code><\/pre>\n\n\n\n
sudo apt install .\/veracrypt-console-1.25.9-Ubuntu-18.04-amd64.deb<\/code><\/pre>\n\n\n\n
which veracrypt<\/code><\/pre>\n\n\n\n
\/usr\/bin\/veracrypt<\/code><\/pre>\n\n\n\n
Use VeraCrypt to Encrypt Drives on Ubuntu<\/a><\/h2>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
Create VeraCrypt Outer Volume<\/h3>\n\n\n\n
\n
<\/figure><\/a><\/div>\n\n\n\n
\n
<\/figure><\/a><\/div>\n\n\n\n
\/dev\/sdb1<\/code><\/strong>.<\/p>\n\n\n\n
lsblk<\/code><\/pre>\n\n\n\n
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 20G 0 disk \n\u2514\u2500sda1 8:1 0 20G 0 part \/\nsdb 8:16 0 4G 0 disk \n\u2514\u2500sdb1 8:17 0 4G 0 part <\/strong>\nsr0 11:0 1 1024M 0 rom \nsr1 11:1 1 1024M 0 rom \n<\/code><\/pre>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/div>\n\n\n
df -hT \/media\/veracrypt1<\/code><\/pre>\n\n\n\n
Filesystem Type Size Used Avail Use% Mounted on\n\/dev\/mapper\/veracrypt1 ext4 3.9G 16M 3.7G 1% \/media\/veracrypt1<\/code><\/pre>\n\n\n\n
Create Veracrypt Inner Hidden Volume<\/h3>\n\n\n\n
\n
<\/figure><\/a><\/div>\n\n\n\n
Mounting VeraCrypt Outer and Inner Hidden Volumes<\/h3>\n\n\n\n
\n
\n
<\/figure><\/a><\/div>\n\n\n\n
\n
df -hT \/media\/veracrypt1<\/code><\/pre>\n\n\n\n
Filesystem Type Size Used Avail Use% Mounted on\n\/dev\/mapper\/veracrypt1 ext4 3.9G 16M 3.7G 1% \/media\/veracrypt1<\/code><\/pre>\n\n\n\n
\n
df -hT \/media\/veracrypt7<\/code><\/pre>\n\n\n\n
Filesystem Type Size Used Avail Use% Mounted on\n\/dev\/mapper\/veracrypt7 ext4 992M 2.6M 923M 1% \/media\/veracrypt7<\/code><\/pre>\n\n\n\n
Other Related Tutorials<\/h3>\n\n\n\n