Encrypt files on Linux the easy way with Kleopatra
GPG encryption is excellent; however, it is tied to the command line. If you want to use GPG to encrypt your files, Kleopatra is an easier way. It’s a GUI tool that allows users to use GPG easily. Here’s how to use it on your system.
Installing Kleopatra on Linux
The Kleopatra app is not standard on any Linux desktops, but it is a KDE application. As KDE Plasma is one of the most popular desktop environments in the Linux community, all Linux distributions have a way to install Kleopatra.
Install the Kleopatra app on your Linux PC; you’ll need a terminal window. Open a terminal window by pressing Ctrl + Alt + T on the keyboard. Alternatively, search for “Terminal” in the app menu and launch it.
The installation can begin with the terminal window open and ready to use. Using the installation instructions below that correspond with the Linux OS you use, get Kleopatra set up on your Linux PC.
Ubuntu
To install the Kleopatra app on your Ubuntu system, you must have the “Ubuntu Universe” software repository enabled. You can enable this software repository by entering the following command in a terminal window.
sudo add-apt-repository universe
Run the update command to refresh Ubuntu’s software sources with the Universe repo added.
sudo apt update
Finally, you can install the Kleopatra app on Ubuntu using the apt install command.
sudo apt install kleopatra
Debian
On Debian Linux, the Kleopatra app is installable via the “Main” Debian software repository. To install it on your system, start by entering the following apt-get install command below.
sudo apt-get install kleopatra
Once the command above is entered, Debian will ask you for your password. Using the keyboard, enter your password into the prompt. Press Enter to confirm it.
With your password confirmed, Debian will ask you to press the Y key to confirm you wish to install the Kleopatra software on your Linux PC. Press Y to confirm and allow the app to install.
Arch Linux
The Kleopatra app is available to all Arch Linux users through the “Extra” software repository. Ensure you have this repo enabled in your Pacman configuration. Then, run the pacman -S command below to install the software.
sudo pacman -S kleopatra
Fedora
On Fedora Linux, so long as you are using 34 or newer, you will be able to install the Kleopatra app through the primary Fedora software repository. To install it on your system, run the following dnf install command below.
sudo dnf install kleopatra
OpenSUSE
If you use OpenSUSE Leap 15.3, Or OpenSUSE Tumbleweed, you’ll be able to install the Kleopatra application. However, those on older releases of OpenSUSE will not be able to get Kleopatra.
To set up Kleopatra on your OpenSUSE system, ensure you have the “Oss All” software repository enabled. Then, run the zypper install command below.
sudo zypper install kleopatra
How to encrypt files on Linux the easy way with Kleopatra
Open up Kleopatra in the app menu. Then, follow the step-by-step instructions below to learn how to encrypt files with the app.
Note: you’ll need to generate a GPG key to encrypt your files. Select the “New key pair” button to start the creation process.
Step 1: Once Kleopatra is open on your desktop, you’ll see the main window. Find the “Sign/Encrypt” button in the main window and click on it with the mouse. When you select this button, a pop-up window will appear on the screen.
Step 2: In the pop-up window that appears in Kleopatra, browse for the file you wish to encrypt. If you have multiple files to encrypt, consider selecting a folder that contains all the files instead.
Step 3: After selecting the file(s) you wish to encrypt, a pop-up window will appear in Kleopatra. Select “Sign as,” followed by your GPG key. Additionally, select “Encrypt with password” to ensure that anyone can decrypt it even if they don’t have your key.
Step 4: Once you’ve selected the “Encrypt with password,” find the “Sign/Encrypt” button, and click on it with the mouse. You’ll then be prompted to enter your password into a pop-up window to encrypt the file.
Step 5: After entering your password, you’ll be asked to sign the encrypted file using your key’s password. Once the password is entered, Kleopatra will show a window that says, “All operations completed.”
Select the “Finish” button to close the window.
Decrypting
To decrypt a file with Kleopatra, find the “Decrypt/Verify Files” button, and click on it with the mouse. Upon selecting this button, a pop-up window will appear on the screen.
Assuming you have your GPG key set up on your computer, Kleopatra will automatically decrypt it. However, if you’ve been given the file without a key but a password, it will ask you to enter a password to decrypt it.
When Kleopatra is done decrypting the file, you’ll see “All operations completed,” followed by “Discard” and “Save All” buttons. Select “Save All” to save the decrypted file to your computer.