How to Encrypt a USB Flash Drive on Linux With VeraCrypt

You can encrypt a USB flash drive on Linux with VeraCrypt by creating a device-hosted VeraCrypt volume on the USB device or one of its partitions. The process is straightforward, but it is destructive: the selected device or partition is formatted and the files already stored there are lost.

Important: Back up anything you need before continuing. You do not have to manually delete every partition first, but you must be certain you select the correct USB device in VeraCrypt. This guide assumes you are creating a new encrypted volume rather than preserving data in place.

Before you encrypt the USB drive

Install VeraCrypt from the official VeraCrypt Downloads page. The project currently lists VeraCrypt 1.26.29 as its stable release and provides Linux AppImages, generic installers, Debian/Ubuntu packages, RPM packages, and ARM64 builds. Using the official download page also helps you avoid old package links and lets you check the published signatures or checksums.

Before opening the wizard, connect the USB flash drive and identify it. On Linux, a command such as lsblk -o NAME,SIZE,FSTYPE,MODEL,MOUNTPOINTS can help you compare the device path, capacity, model, and mounted partitions. Do not rely on a device name such as /dev/sdb alone because those names can change between boots or when other drives are connected.

Encrypt the USB flash drive in VeraCrypt

1. Open VeraCrypt and start the volume wizard

Launch VeraCrypt and click Create Volume. VeraCrypt supports both file-hosted containers and partition/device-hosted volumes; for an encrypted USB drive, you want the latter.

VeraCrypt main window on Linux with the Create Volume button visible
Start from VeraCrypt's main window and open the volume creation wizard.

2. Choose the partition or drive option

Select the option for creating a volume within a partition or drive. The wording can vary by platform or build; VeraCrypt documentation refers to this as a device-hosted volume. Continue with Next.

VeraCrypt Volume Creation Wizard with the partition or drive option selected
Choose the device-hosted option rather than a file container.

3. Create a standard VeraCrypt volume

Select Standard VeraCrypt volume unless you specifically need a hidden volume and understand its additional requirements. For a normal encrypted flash drive, the standard option is the simpler choice.

VeraCrypt Volume Type screen with Standard VeraCrypt volume selected
A standard volume is the usual choice for an encrypted USB drive.

4. Select the correct USB device

Click Select Device, then choose the intended USB device or partition. Match its size and identity with what you saw in lsblk. Double-check this screen: formatting the wrong entry can destroy data on another disk.

VeraCrypt Select Device screen showing a removable USB device highlighted
Confirm the USB device by path and capacity before continuing.

5. Review the encryption options

For most users, leaving VeraCrypt's default encryption settings is reasonable. The program supports several encryption algorithms, and newer releases also offer additional key-derivation choices for non-system volumes. Change these settings only when you have a specific compatibility or policy requirement. The official volume-creation documentation explains the available options.

VeraCrypt Encryption Options screen with AES selected
Review the encryption settings and keep the defaults unless you have a specific reason to change them.

6. Set a strong volume password

Enter a long, unique password and confirm it. Do not reuse a login password or something easy to guess. Store the password securely if you cannot reliably remember it; without the correct credentials, the encrypted data will not be practically recoverable.

VeraCrypt Volume Password screen with password and confirmation fields filled
Create and confirm a strong password for the encrypted USB volume.

7. Choose the filesystem and format the volume

Select a filesystem based on where you need to use the drive. exFAT is a practical choice when the USB drive must move between Linux, Windows, and macOS. For Linux-only use, Ext4 is a common choice. VeraCrypt's Linux build can create FAT, Ext2, Ext3, Ext4, NTFS, exFAT, and Btrfs volumes when the required system formatter is available. FAT is less suitable when you need individual files larger than 4 GiB.

If you are unsure about Quick Format, leave it unchecked; VeraCrypt's documentation recommends the non-quick format when in doubt. Move the pointer around the wizard when prompted to contribute randomness, then click Format. Creation time depends on the drive size and whether Quick Format is disabled.

VeraCrypt Volume Format screen with exFAT selected and Quick Format unchecked
Select the filesystem, leave Quick Format off when unsure, and create the encrypted volume.

8. Mount the encrypted USB when you need it

After the volume is created, return to VeraCrypt. Use Select Device to choose the encrypted USB volume, select an available slot, and click Mount; you can also use Auto-Mount Devices. Enter the volume password when prompted. The official mounting guide documents the available mount options.

VeraCrypt main window on Linux showing a device selected and a password prompt for mounting
Mount the encrypted USB through VeraCrypt and enter the volume password.

Use the encrypted USB safely

  • Unmount the VeraCrypt volume before unplugging the drive. Finish file transfers first, unmount it in VeraCrypt, and then safely remove the USB device from Linux.
  • Do not reformat the encrypted partition while it is unmounted. VeraCrypt warns that formatting a device-hosted volume outside its mounted state destroys the VeraCrypt volume.
  • Keep a separate backup of important files. Encryption protects confidentiality; it does not protect against flash-drive failure, accidental deletion, or physical damage.
  • Use VeraCrypt on other computers that need access. VeraCrypt volumes are cross-platform, but the filesystem inside the encrypted volume must also be supported by the operating system.

For command-line workflows on Linux, VeraCrypt also provides a text interface, including interactive volume creation with veracrypt -t -c. See the official Linux and macOS command-line documentation for supported options and security notes.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.