Hasleo BitLocker Anywhere For Linux has a command line interface (CLI) for users to perform operations without actually launching the graphical user interface (GUI), it allows you to issue commands from the Terminal or through the use of scripts.
Notes: Please note that Command Line Interface (CLI) is not available in the Professional Edition, please contact us to purchase the edition that supports CLI.
Step 1. Open Terminal and switch to root user.
Step 2. Navigate to the folder where BitLockerAnywhereCmd is located by typing in:
cd /home/jason/bitlocker-anywhere/bin
Tips: If you extracted the program in a different location, enter that location instead.
Step 3. Type "./BitLockerAnywhereCmd /?" for help, all the command and parameters of this tool will be listed as below:
Hasleo BitLocker Anywhere Command Line Tool [Version 9.3 (Build: Nov 23 2023)]
Copyright (C) 2023 Hasleo Software. All rights reserved.
| /a <action> | Specifies the action (activate/drives/encrypt/decrypt/lock/unlock) you want to perform. | |
|---|---|---|
| activate: Activate the license key | ||
| drives: Lists drives | ||
| encrypt: encrypts the specified drive | ||
| decrypt: decrypts the specified drive | ||
| lock: lock the specified drive | ||
| unlock: unlock the specified drive | ||
| /? | Produce a help message. |
| /n <key> | Specifies the license key. | |
|---|---|---|
| /c <code> | Specifies the offline activation code. | |
| /? | Produce a help message. |
| /? | Produce a help message. |
|---|
| /n <name> | Specifies the name of the drive that you want to encrypt. You can perform | |
|---|---|---|
| the 'drives' operation to view the name of all drives. | ||
| /p <password> | Specifies the password used to encrypt the drive. | |
| /u <used> | (Optional) Specifies whether to encrypt the used disk space only, it | |
| defaults to 0 if not provided. 0: No 1: Yes |
||
| /c <compatible> | (Optional) Specifies whether to encrypt the drive using compatibility mode, | |
| it defaults to 0 if not provided. 0: No 1: Yes |
||
| /s <strength> | (Optional) Specifies whether to encrypt the drive using 256-bit encryption | |
| strength, it defaults to 0 if not provided. 0: No 1: Yes |
||
| /r <recovery> | (Optional) Specifies the path to save the BitLocker recovery key. | |
| /i <silent> | (Optional) Specifies the silent mode, it defaults to 0 if not provided. | |
| 0: Non-silent mode 1: Silent mode |
||
| /? | Produce a help message. |
| /n <name> | Specifies the name of the drive that you want to decrypt. You can perform | |
|---|---|---|
| the 'drives' operation to view the name of all drives. | ||
| /p <password> | (Optional) Specifies the password used to decrypt the drive. You cannot | |
| specify /p and /r at the same time. | ||
| /r <recovery> | (Optional) Specifies the BitLocker recovery key used to decrypt the drive. | |
| You cannot specify /p and /r at the same time. | ||
| /u <used> | (Optional) Specifies whether to decrypt the used disk space only, it | |
| defaults to 1 if not provided. 0: No 1: Yes |
||
| /i <silent> | (Optional) Specifies the silent mode, it defaults to 0 if not provided. | |
| 0: Non-silent mode 1: Silent mode |
||
| /? | Produce a help message. |
| /n <name> | Specifies the name of the drive that you want to lock. You can perform the | |
|---|---|---|
| 'drives' operation to view the name of all drives. | ||
| /s <silent> | (Optional) Specifies the silent mode, it defaults to 0 if not provided. | |
| 0: Non-silent mode 1: Silent mode |
||
| /? | Produce a help message. |
| /n <name> | Specifies the name of the drive that you want to unlock. You can perform | |
|---|---|---|
| the 'drives' operation to view the name of all drives. | ||
| /p <password> | (Optional) Specifies the password used to unlock the drive. You cannot | |
| specify /p and /r at the same time. | ||
| /r <recovery> | (Optional) Specifies the BitLocker recovery key used to unlock the drive. | |
| You cannot specify /p and /r at the same time. | ||
| /? | Produce a help message. |

As you can see from the above, you can use the command-line interface provided by the Hasleo BitLocker Anywhere to encrypt drives with BitLocker, decrypt, lock and unlock BitLocker encrypted drives from the Terminal or scripts in linux.
A: Hasleo BitLocker Anywhere For Linux provides a command-line interface (CLI) that allows you to encrypt, decrypt, lock, and unlock BitLocker encrypted drives from the Terminal or scripts in Linux without launching the GUI.
A: Using the CLI, you can perform actions including: activate (license activation), drives (list drives), encrypt (encrypt drive), decrypt (decrypt drive), lock (lock drive), and unlock (unlock drive).
A: Type "./BitLockerAnywhereCmd /?" in the Terminal to see all available commands and parameters for the BitLocker Anywhere command-line tool.
A: Yes, the CLI allows you to automate BitLocker operations through scripts, making it ideal for batch processing and enterprise deployment.
A: Use the command: ./BitLockerAnywhereCmd /a encrypt /n /dev/sdb1 /p 12345678 /u 1 /c 1 /s 1 /r /home/user/keys /i 1, where /n specifies the drive, /p is the password, and other options control encryption mode.
A: The /i parameter specifies silent mode: 0 for non-silent mode (shows GUI), 1 for silent mode (runs without user interaction). This is useful for scripted operations.
A: Run the command: ./BitLockerAnywhereCmd /a drives to list all available drives on the system.