When it comes to encryption, you have the choice, in most cases at least, to go for either Linux (LUKS) or Windows (BitLocker). But if you have a Drive you want to use on Linux AND Windows, you may run into some complications. In this Open Bitlocker Drive on Linux Tutorial, I show you exactly how to do that.
Table of Contents
- Step 1 – Install Dislocker to Open BitLocker Drive on Linux
- Step 2 – Create a Folder to Mount the Drive
- Step 3 – Finding our USB Drive
- Step 4 – Unlocking your USB Drive
- Step 5 – Mounting your Drive
- Step 6 – Creating a Script to automatically Mount the locked Drive
We are going to use a Tool called Dislocker to do the job.
Step 1 – Install Dislocker to Open BitLocker Drive on Linux
First, we need to install Dislocker. It doesn’t get any easier than that.
sudo apt-get install dislocker
Step 2 – Create a Folder to Mount the Drive
Next, we are going to create a Folder so we can mount the Drive.
sudo mkdir /media/bitlocker sudo mkdir /media/mount
Step 3 – Finding our USB Drive
Now we need to figure out which drive description our USB Drive has. We can do that easily using fdisk.
sudo fdisk -l
Most likely, you’ll have to scroll down to the bottom. You can easily identify your Drive by Size. Make sure to use the drive description under Device, in this example sde1 and not only sde.
Step 4 – Unlocking your USB Drive
Now we are going to use Dislocker to Decrypt the Drive. Make sure to replace –uYourPassword with your password and sde1 with your drive description! But leave the -u in front of it. So if your password is Horseradish the command should call: -uHorseradish . Alternatively, just leave it at -u and you will get prompted for the password.
sudo dislocker -r -V /dev/sde1 -uYourPassword -- /media/bitlocker
Step 5 – Mounting your Drive
Finally, we are going to Mount the now encrypted Drive.
sudo mount -r -o loop /media/bitlocker/dislocker-file /media/mount
And voila, you can access the files on your previously encrypted Drive. You can use a Bitlocker Encrypted Drive to store your Passwords on, for example. If you work on Windows & Linux like me, this is a good way to utilize your USB Drive on both Systems.
Step 6 – Creating a Script to automatically Mount the locked Drive
Because we are all lazy (and so we should!), we don’t want to run those commands again every single time we plug in our Drive. I created a Bash script to do this for us. We need to create a new file in our /usr/local/bin Path, so we can access the script from everywhere.
sudo gedit /usr/local/bin/unlock.sh
Go ahead and paste my script into your Text File. Make sure you adjust it to your own Drive Letters etc.
/media/bitlocker sudo mount -r -o loop /media/bitlocker/dislocker-file /media/mountsudo dislocker -r -V /dev/sde1 -u --
Save the File by hitting CTRL+S. Adjust the permission to make the File executable:
sudo chmod +x /usr/local/bin/unlock.sh
So the next time you restart and need to access your USB Drive again, simply open a Terminal and type:
Code language: CSS (css)
And you will need to enter your Sudo Password and your Bitlocker Password and your Drive will be unlocked and automatically mounted.
This is how easy you can open a Bitlocker Drive on Linux. Learn more about Linux and Open Source here.
🐧 There are some related articles!
👉 Top Things to do after installing Kali Linux
👉 Linux on Windows – The Complete WSL 2 Tutorial Series
👉 Create Generalized Windows Images with FOG Server
👉 Install FOG Server on Ubuntu
👉 Install Kali Linux on Windows – Complete Guide
👉 The Complete Kali Linux and Windows Dual Booting Guide
👉 Cronjob – The Complete Guide to Cronjobs
👉 Open Bitlocker Drive on Linux – Quick & Easy