Encryption is the best way to protect your important documents personal info and other credentials. Suppose, you have a USB pen drive and your all important data stored on it. In case you will lose your USB pen drive, all data stored on it will be lost. It will be in hands of some other person which will access your personal information and misuse it. So, the best solution to protect your data is to encrypt your USB pen drive with password.
In this tutorial, we will learn how to encrypt your USB drive on Ubuntu 18.04 LTS.
- Ubuntu 18.04 desktop installed on your system.
- A non-root user with sudo privileges.
First, you will need to install gnome-disk-utility and cryptsetup to your system. Cryptsetup is a utility for setting up encrypted filesystems with the help of Device Mapper and dm-crypt. You can install both tools with the following command:
sudo apt-get install gnome-disk-utility cryptsetup -y
Encrypt USB Drive
IMPORTANT: Before you proceed, back up all data that is on the USB Media as the data on the USB Media gets erased when the partition type is changed to an encrypted partition.
First, plug in your USB flash drive to the system. Next, launch the Disks utility from the Unity Dash. You should see USB drive in the left pane:
Next, umount the filesystem as shown below:
Next, click on the Format button as shown below:
Next, select encryption type, partition name and set your password as shown below:
Now, click on the Format button to encrypt the USB drive.
Access USB Drive
Your USB pen drive is now secure with a password. To test it, unplug and plug in USB drive again. You should be asked to input password to get access the partition as shown below:
Now, provide the password and click on the Connect button. You can access your USB pen drive.
Source : HowtoForge