How to encrypt a USB flash drive on Linux with VeraCrypt
Do you have a USB flash drive that you would like to encrypt with VeraCrypt? Don’t know how to do it? Follow along with our guide to learn how to How to encrypt a USB flash drive on Linux with VeraCrypt!
Note: encrypting a USB flash drive with VeraCrypt requires all partitions to be deleted. Follow this guide to learn how to securely erase a USB flash drive before attempting to follow this tutorial.
Installing VeraCrypt on Linux
VeraCrypt must be installed on your Linux PC, as it does not come preinstalled by default. Sadly, the VeraCrypt application does not come in any modern Linux operating system’s software repository. To get it working, you will need to download packages from the developer’s website manually. Officially, VeraCrypt supports Debian, Ubuntu, Fedora, OpenSUSE, as well as the source code.
To start the installation process, opent up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, follow the command-line instructions outlined below that correspond with the Linux operating system you currently use.
Ubuntu
To get VeraCrypt working on Ubuntu, start by downloading the latest DEB package from the internet.
Note: in this guide, we’re focusing on 20.04 LTS, the latest release of Ubuntu. However, other Ubuntu releases are available here.
wget https://launchpad.net/veracrypt/trunk/1.24-update4/+download/veracrypt-1.24-Update4-Ubuntu-20.04-amd64.deb -O /tmp/veracrypt-1.24-Update4-Ubuntu-20.04-amd64.deb
After downloading the latest VeraCrypt DEB package to your computer, run the Apt command below to install VeraCrypt.
sudo apt install /tmp/veracrypt-1.24-Update4-Ubuntu-20.04-amd64.deb
Debian
VeraCrypt has DEB packages available for both Debian 9 (old stable) and Debian 10 (current stable.) To get it working with current stable, start by downloading the latest package from the internet with wget.
wget https://launchpad.net/veracrypt/trunk/1.24-update4/+download/veracrypt-1.24-Update4-Debian-10-amd64.deb -O /tmp/veracrypt-1.24-Update4-Debian-10-amd64.deb
When the download is complete, use the dpkg command to install VeraCrypt to your Debian PC.
sudo dpkg -i /tmp/veracrypt-1.24-Update4-Debian-10-amd64.deb
Run the apt-get install -f command to correct any dependency errors that may occur.
sudo apt-get install -f
Arch Linux
The VeraCrypt application is available for Arch Linux users in the “Community” software repository. To get it installed, ensure that you have “Community” set up. Then, install the software with the pacman command below.
sudo pacman -S veracrypt
Fedora
On the VeraCrypt website, they don’t explicitly mention Fedora Linux. However, it is possible to get it working via the CentOS 8 package. To install, start by downloading the RPM package to your Fedora Linux PC.
wget https://launchpad.net/veracrypt/trunk/1.24-update4/+download/veracrypt-1.24-Update4-CentOS-8-x86_64.rpm -O /tmp/veracrypt-1.24-Update4-CentOS-8-x86_64.rpm
Once the downloading process is complete, move into the /tmp directory with the CD command.
cd /tmp
From inside of the /tmp folder, run the dnf install command to load up the latest release of VeraCrypt on your Linux system.
sudo dnf install veracrypt-1.24-Update4-CentOS-8-x86_64.rpm
OpenSUSE
VeraCrypt is available for OpenSUSE Linux 15. To get the app working, start by downloading the RPM package to your computer using the wget command.
wget https://launchpad.net/veracrypt/trunk/1.24-update4/+download/veracrypt-1.24-Update4-openSUSE-15-x86_64.rpm -O /tmp/veracrypt-1.24-Update4-openSUSE-15-x86_64.rpm
With the package done downloading, use the zypper install command to get VeraCrypt up and running.
cd /tmp
sudo zypper install veracrypt-1.24-Update4-openSUSE-15-x86_64.rpm
Generic Linux
There’s a generic installer for VeraCrypt if you’re on a Linux operating system that is not officially supported. To get your hands on it, click (https://launchpad.net/veracrypt/trunk/1.24-update4/+download/veracrypt-1.24-Update4-setup.tar.bz2) here.
Encrypting USB flash drive
To encrypt your USB flash drive, start by launching the VeraCrypt application on the desktop. Once the app is open, follow the step-by-step instructions below.
Step 1: Select the “Volumes” menu with the mouse to reveal it’s options. Then, find the “Create New Volume” button and select it.
Step 2: Upon clicking on the “Create New Volume” button, a wizard will appear. In this wizard window, find the option that says “Create a volume within a partition/drive, click on it, and select “Next.”
Step 3: Set your Volume Type to “Standard VeraCrypt volume” and click the “Next’ button to move on.
Step 4: Find the “Select Device” button and click on it with the mouse. Use the UI to select your USB flash drive. Click “Next” to move to the next page.
Step 5: After selecting your device, you will be presented with several VeraCrypt encryption options for your USB flash drive. Go with the default option. Alternatively, change encryption types by selecting one in the “Encryption Algorithm” menu.
Click “Next” to move on.
Step 6: Enter your volume’s password in the “Password” box. Be sure to use a secure, memorable password for your volume. If you lose your password, there is no way to recover it!
Step 7: Click on the “Confirm password” box and re-enter your secure password. Then, find the “Next” button and click on it to move to the next page.
Step 8: Find the “Filesystem type” tab, and change it from FAT to Linux Ext4. Alternatively, leave it at FAT if you need to access the Flash drive on non-Linux systems.
After setting your filesystem, click next to go to the format page. Click the “Format” button to create the volume.