Secure USB flash memory drives in Linux

Thumb drive

Thumb drive

USB flash memory drives (thumb drives or pen drives as some people call them), are great for carrying files from one computer to another, such as from work to home, or even from your desktop to your laptop. Unfortunately though, they are very easy to lose. Someone could find your drive and simply plug it in to a PC to access all your files. The solution is to encrypt the drive in Linux.

USB flash memory drives are usually formatted with the FAT filing system because this can be accessed on a Windows PC, and Apple Mac and a Linux PC. It is a universal file format that everything understands. This has its uses, such as when you want to transfer files between different computers, but it has security implications and anyone that finds a lost or stolen flash drive can plug it into any computer and access the files.

As a Linux user, simply formatting the flash drive with the Linux file system will defeat a large number of potential thieves. If they plug it into a Windows PC, which is 90% of the computers in the world, it comes up with a message stating that it isn’t formatted and do you want to format it for use in the computer? A lot of people will think that they have found/stolen an unformatted USB flash memory drive.

That won’t deter a determined thief and if they dig a bit deeper or have a Linux PC they might discover that it is a Linux formatted drive. They can then access the contents.

The best solution to keep your files private is to use an encrypted Linux file format. Most Linux distros can do this, but I will be using Mint. Your distro might have different menus, but you should still be able to do this.

Plug in the USB flash memory drive, then go to the menu and run Disks (it may be called something else in your distro):

Access Linux Mint's menu

This displays the drives attached to the computer and you can see the USB flash drive listed as 4.0 GB Thumb Drive in the screen shot. Click the gear on the right to access the menu and select Format.

Format a disk in Lunux

There is a Type drop-down menu and if you wanted a drive that was compatible with all systems then FAT, the top option, is the one to go for. We want to encrypt the drive so that no-one else can access it though.

Format and encrypt a drive

Enter a name for the drive and a password to lock it. Click Format and after a minute it is done.

Password protection for drives

Whenever you insert the USB flash drive into the computer, you are prompted to enter the password. There are options to remember it and if you choose Remember forever, you will never need to enter the password again. If you lost the drive somewhere, a finder or thief would not be able to access the contents without the password.

A securely encrypted thumb drive

You now have a secure USB flash memory drive that you can use to lock away your private files.

notepadGet the tips, guides and courses you need to make your blog or website a success! Go to: RAW Guides (



Leave a comment

Your email address will not be published.