Instructions on how to encrypt files and folders on Ubuntu

Ubuntu possesses many advanced security features that users may not know about. For example, LibreOffice users can encrypt files and folders on Ubuntu extremely simply but extremely securely. So what is that feature and how to use it on Ubuntu for files and folders?

If you are familiar with Ubuntu, you will see that there are many things on Ubuntu that are many times better than Windows 7 and 10. Of course we are not talking about games because there is no operating system better suited for gaming than Windows. However, the way to encrypt files and folders on Ubuntu is different. On Ubuntu there are many security methods to help you protect your privacy to the maximum.

Instructions for encrypting files and folders on Ubuntu

Step 1: To encrypt files and folders on Ubuntu, we first need to install Gnupg on Ubuntu, download Gnupg here.

Instructions on how to encrypt files and folders on Ubuntu Picture 1Instructions on how to encrypt files and folders on Ubuntu Picture 1

Step 2: Click on the Gnupg folder to extract it on Ubuntu.

Instructions on how to encrypt files and folders on Ubuntu Picture 2Instructions on how to encrypt files and folders on Ubuntu Picture 2

Step 3: Continue clicking Install to install this software on Ubuntu. After installation is complete you can close it.

Instructions on how to encrypt files and folders on Ubuntu Picture 3Instructions on how to encrypt files and folders on Ubuntu Picture 3

Step 4: In case you cannot install Gnupg, press the key combination Ctrl + ALT + T to open the Terminal window, here you type: sudo apt install gnupg2

Instructions on how to encrypt files and folders on Ubuntu Picture 4Instructions on how to encrypt files and folders on Ubuntu Picture 4

Type the password before confirming the installation. When typing the password, the characters will not appear.

Instructions on how to encrypt files and folders on Ubuntu Picture 5Instructions on how to encrypt files and folders on Ubuntu Picture 5

Step 5: If the system asks if you want to continue> press Y then enter to continue the installation.

Instructions on how to encrypt files and folders on Ubuntu Picture 6Instructions on how to encrypt files and folders on Ubuntu Picture 6

Step 6: After installation is complete, to see the list of encryption methods, run the command below: gpg2 --version

Instructions on how to encrypt files and folders on Ubuntu Picture 7Instructions on how to encrypt files and folders on Ubuntu Picture 7

The AES algorithm in this list is AES128 . You can select another encryption algorithm as the default by adding a line to configure the file that GnuPG uses when running. The configuration file is called gpg.conf, located in a hidden folder called .gnupg in the Home directory.

Instructions on how to encrypt files and folders on Ubuntu Picture 8Instructions on how to encrypt files and folders on Ubuntu Picture 8

Step 7: The next step now is to edit the configuration file in gedit, run the command below in the Terminal window: gedit -/.gnupg/gpg.conf

Instructions on how to encrypt files and folders on Ubuntu Picture 9Instructions on how to encrypt files and folders on Ubuntu Picture 9

Step 8: When it opens, type ciphe - algo AES256 and save it.

Instructions on how to encrypt files and folders on Ubuntu Picture 10Instructions on how to encrypt files and folders on Ubuntu Picture 10

Step 9: Now we start encrypting files and folders on Ubuntu, for example encrypting with file -/Documents/Taimienphi.vn/Taimienphi.vn.txt

Instructions on how to encrypt files and folders on Ubuntu Picture 11Instructions on how to encrypt files and folders on Ubuntu Picture 11

>> Type the command gpg --symmetric --cipher-algo AES256 -/Documents/Taimienphi.vn/Taimienphi.vn.txt

Instructions on how to encrypt files and folders on Ubuntu Picture 12Instructions on how to encrypt files and folders on Ubuntu Picture 12

Then enter the password twice to confirm the password for that encrypted file.

Instructions on how to encrypt files and folders on Ubuntu Picture 13Instructions on how to encrypt files and folders on Ubuntu Picture 13

Step 10: After encrypting files and folders on Ubuntu, we can add a password to that encrypted file with the command gpg --symmetric -/Documents/Taimienphi.vn/Taimienphi.vn.txt

Instructions on how to encrypt files and folders on Ubuntu Picture 14Instructions on how to encrypt files and folders on Ubuntu Picture 14

Step 11: Then enter the password to complete the process of encrypting files and folders on Ubuntu.

Instructions on how to encrypt files and folders on Ubuntu Picture 15Instructions on how to encrypt files and folders on Ubuntu Picture 15

Inside the encrypted folder, you will now see another file appear with the *gpg extension, which means the encryption of Files and folders on Ubuntu has been completed.

Instructions on how to encrypt files and folders on Ubuntu Picture 16Instructions on how to encrypt files and folders on Ubuntu Picture 16

Step 12: To rename the encrypted file, type the command gpg -o Taimienphivn.enc --symmetric -/Documents/Taimienphi.vn/Taimienphi.vn.txt

Where > Taimienphivn.enc is the new file name.

>>Taimienphi.vn.txt is the original file name.

Instructions on how to encrypt files and folders on Ubuntu Picture 17Instructions on how to encrypt files and folders on Ubuntu Picture 17

Above is all the information that users need to know when researching file and folder encryption on Ubuntu. With the instructions for encrypting files and folders on Ubuntu, we can encrypt files ourselves as desired. And there are many other tips we want to share with you about Ubuntu, but TipsMake would like to see you in the next articles on the TipsMake page.


With the above trick, we know another way to encrypt data in Ubuntu. Indeed, data encryption is not as simple as Windows, but in terms of security features, it is not inferior. One thing to note is that readers must check the version of Ubuntu they are using because not all versions support it. To avoid having to check the Ubuntu version , another way is to always update it to the latest version.

4.5 ★ | 2 Vote