
VeraCrypt is an open-source encryption tool designed to safeguard sensitive data by encrypting files, directories, and storage drives. Install VeraCrypt on Ubuntu 24.04 to take advantage of its enhanced security features. Built as a successor to TrueCrypt, VeraCrypt improves upon its predecessor by addressing known vulnerabilities and ensuring compatibility with modern systems. With its advanced encryption algorithms and support for features like on-the-fly encryption, hidden volumes, and plausible deniability, VeraCrypt is trusted by both individuals and enterprises for secure data protection.
This article explains how to install VeraCrypt on Ubuntu 24.04. You will use VeraCrypt to create and access encrypted volumes using CLI and GUI methods on your workstation.
Before you begin, you need to:
VeraCrypt is not available in the default package repositories on Ubuntu 24.04. Install the trusted Unit 193 PPA maintained to add the latest VeraCrypt package information to your APT repository sources. Follow the steps below to add the PPA to your APT repository sources and install VeraCrypt on your Ubuntu 24.04 workstation.
Update the server's APT package index.
Add the VeraCrypt PPA to your APT repository sources.
Update the server's APT package index to apply the PPA repository changes.
Install VeraCrypt.
View the installed VeraCrypt version.
Output:
VeraCrypt allows you to protect sensitive data by encrypting volumes. You can create a new encrypted volume or encrypt an external storage device. Follow the steps below to securely encrypt volumes using VeraCrypt on your Ubuntu 24.04 workstation.
Create a new sample-dir directory.
Switch to the new sample-dir directory.
Create a randomdata.txt file using a text editor such as nano to generate new encryption keys.
Add the following random data to the file. Replace the example data with 320 or more characters of your desired text.
Save and close the file.
Run the following command to create a new vctest.vc encrypted volume. Replace EnterYourPassword1! with your desired password.
Within the above command:
--text: Specifies that the operation is performed in text mode, suitable for command-line use without a graphical interface.--create: Specifies the file or device to create the encrypted volume. For example, this command creates the volume name vctest.vc.--size: Specifies the size of the volume to be created. In this example the size of the volume in megabytes M. You can also use K for kilobytes, G for gigabytes.--password: Specifies the password for the encrypted volume. Recommend to choose a password consisting of 20 or more characters but you can also create with your desired password. Replace EnterYourPassword1! password with your desired password.--volume-type: Specifies the volume type normal or hidden, this command creates a standard volume.--encryption: Specifies the encryption algorithm to be used. This command uses AES the Advanced Encryption Standard is used for encrypting data. It is fast, secure, and widely supported.--hash: Specifies the hash algorithm to be used. sha-512 is a cryptographic hash function used for key derivation in the encryption process.--filesystem: Formats the volume with an ext4 filesystem. Specifies the filesystem to format the volume so volume is portable with other operating systems such as macOS and Windows.--pim: Personal Iterations Multiplier (PIM) is a special number that allows you to specify the number of times the hashing algorithm executes. The default value is zero.--keyfiles: Specifies additional key files for added security. This command uses the password so you don't need a keyfile and pass the empty string.--random-source: Provides a file containing random data for generating the encryption keys. The above command creates a 200MB VeraCrypt encrypted volume named vctest.vc using the AES encryption algorithm and SHA-512 hashing. It sets the filesystem to ext4, uses a specified password, and provides a random data file for generating encryption keys. The volume type is normal, with no key files or custom PIM.
Output:
Run the following command to mount the encrypted vctest.vc volume to the /mnt directory.
Within the above command:
--mount: Specifies the Mount point where the volume will be accessible. For example /mnt directory.--slot: Specifies the slot number to use for mounting the volume. 1 Mounts the volume in slot 1. VeraCrypt supports multiple slots for mounting multiple volumes simultaneously.--verbose: Displays the command progress.Output:
Switch to the /mnt directory to access the volume.
You can now create, read, and write files within the mounted directory.
View all mounted VeraCrypt volumes and verify that the vctest.vc volume is available.
Your output should be similar to the one below.
Switch to your user's home directory.
Dismount a volume using its filename. For example, dismount the vctest.vc volume.
--dismount: Dismounts all mounted VeraCrypt volumes, ensuring data security when not in use.
Dismount the volume using its mount directory such as /mnt.
Dismount a volume using its slot number (Alternative method).
Dismount all mounted volumes.
List all mounted volumes to verify the changes.
Output:
Follow the steps below to uninstall VeraCrypt on Ubuntu 24.04 if required.
Uninstall VeraCrypt.
Remove the VeraCrypt PPA from your APT repository sources.
Update the server's APT package index to apply the changes.
You have successfully installed VeraCrypt Ubuntu 24.04 and encrypted volumes using the CLI and GUI methods. VeraCrypt enhances data security by allowing you to encrypt files, directories, and drives to securely access them on your workstation. For more information and configuration options, visit the VeraCrypt documentation.
0 Comments
Be the first to comment and share your perspective with the community.