How to encrypt USB flash drives
This article describes how to use Cryptsetup to encrypt a USB flash drive
As the storage capacity of the USB flash drive increases and the price decreases, you can easily store all your personal data in a portable and Compact USB flash drive. Although you can't do without a USB flash drive now, I also need to face up to some shortcomings of the USB flash drive. For example, a USB flash drive is very vulnerable to theft and loss.
Enterprises need to pay attention not only to access passwords, but to protect data by encrypting devices. The following describes how to create an encrypted USB flash disk in Ubuntu:
First, you need to install cryptsetup in Linux:
Sudo apt-get install-y cryptsetup
After the installation, insert the USB flash drive you want to encrypt into the computer. Remember to back up the data in the USB flash drive because the disk is required during the encryption process.
After you back up the data in the USB flash disk, open the disk tool in Dash.
Now, select your USB flash drive from the list on the left and click the stop or unmount button under the highlighted area.
Next, click the gear icon in the row and select "format". A window is displayed.
You can select the fast or slow formatting option (the slow speed is safer), and then select "encrypt and be compatible with Linux (LUKS + Ext4 )".
Finally, you need to enter a name for the USB flash drive, set a password, and start formatting.
Depending on the selected formatting speed options, you need to wait for a different time. Once the USB flash drive is pulled out, you will see the following prompt:
Congratulations, you have successfully encrypted your USB flash drive.
It's so easy to encrypt a USB flash drive in Ubuntu. Every time you connect the USB flash drive to a Linux system, it will allow you to provide a password to unlock it, and then you can use it as before. Even if you lose the USB flash drive, the data in it is still safe, and hackers cannot obtain the content without relevant authentication.