VeraCrypt is free open-source disk encryption software. I use it predominantly for encrypting data on portable devices (see Backups for more details).

Installation

Arch Linux:

sudo pacman -S veracrypt

Other distributions: Download from https://veracrypt.io/en/Downloads.html

Usage

Create an encrypted volume

veracrypt -c

Follow the interactive prompts to:

  1. Choose volume type (normal or hidden)
  2. Select volume location (file or device)
  3. Pick encryption algorithm (AES recommended)
  4. Set volume size
  5. Create password

Mount a volume

# Mount to /mnt/veracrypt1 (default slot 1)
veracrypt /path/to/volume /mnt/veracrypt1
 
# Mount with specific slot
veracrypt --slot=2 /path/to/volume /mnt/veracrypt2

Dismount

# Dismount specific volume
veracrypt -d /mnt/veracrypt1
 
# Dismount all
veracrypt -d

Common Options

OptionDescription
-cCreate new volume
-dDismount
--slot=NUse slot N (1-64)
-tText mode (no GUI)
--non-interactiveFor scripts
-p PASSWORDProvide password (insecure, avoid)

Portable Drive Setup

For encrypted USB drives:

  1. Create a file-hosted volume on the drive
  2. Copy the portable VeraCrypt binary to the drive
  3. Now usable on any machine without installation

Tips

  • Use keyfiles for additional security (combine with password)
  • For full disk encryption on Linux, consider LUKS instead
  • Hidden volumes provide plausible deniability
  • Always safely eject before removing portable drives