Guide to Encrypting Files and Directories on Ubuntu
Step 1: To encrypt files and directories on Ubuntu, first, we need to install Gnupg on Ubuntu. Download Gnupg from this location.
Step 2: Proceed to click on the Gnupg folder to extract it on Ubuntu.
Step 3: Continue by clicking Install to set up this software on Ubuntu. Once the installation is complete, you can close it.
Step 4: If you encounter issues installing Gnupg, press the key combination Ctrl + ALT + T to open the Terminal window. Once opened, type: sudo apt install gnupg2
Enter your password before confirming the installation. Note that the password characters won't be visible as you type.
Step 5: If the system prompts whether to proceed or not, press Y and then press Enter to continue the installation.
Step 6: After the installation is complete, to view the list of encryption methods, run the following command: gpg2 --version
The featured AES cipher in this list is AES128. You can opt for a different 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 and is located in a hidden directory named .gnupg within the Home directory.
Step 7: The next step is to edit the configuration file in gedit. Run the following command in the Terminal window: gedit -/.gnupg/gpg.conf
Step 8: When it opens, type ciphe-algo AES256 and then save it.
Step 9: Now, let's start encrypting files and folders on Ubuntu. For example, encrypt a file in -/Documents/Mytour/Mytour.txt
>> Type the command gpg --symmetric --cipher-algo AES256 -/Documents/Mytour/Mytour.txt
Then, enter the password twice to confirm the password for that encrypted file.
Step 10: After encrypting files and folders on Ubuntu, you can add a password to that encrypted file with the command gpg --symmetric -/Documents/Mytour/Mytour.txt
Step 11: Then, enter the password again to complete the process of encrypting files and folders on Ubuntu.
Inside the encrypted folder, you will now see another file with the extension *gpg, indicating the completion of encrypting files and folders on Ubuntu.
Step 12: To rename the encrypted file, type the command gpg -o Mytourvn.enc --symmetric -/Documents/Mytour/Mytour.txt
Where > Mytourvn.enc is the new file name.
>> Mytour.txt is the original file name.
Here is all the information users need to know when exploring encryption of files and folders on Ubuntu. With the guide on encrypting files and folders on Ubuntu, you can encrypt files as desired. There are many more tricks we'd like to share with you about Ubuntu, but Mytour invites you to stay tuned for the upcoming articles on the Mytour page.
With the above trick, we have learned another way to encrypt data in Ubuntu. Indeed, the process of data encryption is not as simple as in Windows, but in terms of security features, it is just as robust. One thing to note is that readers must check the version of Ubuntu they are using, as not every version supports this. To avoid the need to check the Ubuntu version, another method is to always keep it updated to the latest version.