4 Methods to Encrypt, Decrypt or Password Protect Files in Linux

Keep your information safe from prying eyes

Encrypt, Decrypt or Password Protect Files, If you have got touchy information in your laptop, it should be hidden far away from prying eyes.

That manner taking greater steps to defend that information. How do you that? If you’re using Linux.

There are a number of tools that allow you to to be successful with this mission.

Some of this equipment is built into the operating gadget and some will want to be mounted.

Let’s take a look at 4 such techniques that may hide your information away.

Our first technique doesn’t absolutely appoint any encryption or password safety.

However, if you simply want to tuck a document away from the handiest manner in Linux.

You can do that while not having to put in any 0.33-party applications or employ more complex encryption tools. Here’s how.

01 Open your distribution’s default report supervisor and navigate to the place housing the documents you want to hide away.

Right-click on an empty spot inside the record supervisor and click New > Folder.

02 When brought about, deliver the new folder a name, but make certain it begins with a period. So in case, you need to call the folder documents, call it. Files.

Tip: In Linux, folders that start with a length are called hidden folders and are not displayed, with the aid of default, in the document manager or from the command line.

03 If you can’t see hidden folders in your file supervisor, hit the Ctrl+H key aggregate to your keyboard. You have to then see all the hidden folders and files inside that listing (including the brand new one you just created).

04 Move files you need to hide into that newly created folder.

Encrypt, Decrypt or Password Protect Files, Hide Those Files Again

Encrypt, Decrypt or Password Protect Files, When you’re completed hiding your documents away.

Ensure to hit the Ctrl+H keyboard shortcut once more, so the file supervisor will not display hidden documents and folders.

The next method uses actual encryption software. The command used for this is gpg, which is mounted on almost all Linux distributions.

Let’s say you need to encrypt the report ~/Documents/check.Docx. Here’s the way to do that:

Open a terminal window and navigate to the Documents listing with the command

cd ~/Documents

Encrypt the document with the command

gpg -c test.docx

When prompted, type and affirm an encryption password.

02 You ought to now see a brand new (encrypted) file, named take a look at.Docx.Gpg. That new file can’t be opened without decryption.

03 Decrypt the .Gpg file with the command

gpg test.docx.gpg

You might be induced for the passphrase you created all through the encryption. Type that passphrase to decrypt the document.

Tip: If you didn’t circulate or delete the unique record, gpg will ask in case you need to overwrite the brand new record or supply it a new name. For your first strive at encrypting and decrypting, you must either first, pass the original record (earlier than decrypting) or give the newly decrypted report a specific call. Once you have the dangle of encrypting/decrypting, you could continually delete the authentic document once you’ve encrypted it.

04 You can now open the encrypted report.

If you decide upon the usage of a graphical (GUI) tool over the command line and you operate a distribution that includes the Nautilus record manager (inclusive of Ubuntu Desktop).

You could without difficulty upload the capacity to encrypt/decrypt files with a simple proper-click on at the goal document. Here’s how:

Encrypt,Decrypt files

01 Open a terminal window and problem the command

sudo apt-get install seahorse-nautilus -y

02 When induced, type your sudo password.

03 When the set up completes, restart nautilus with the command

nautilus -q

04 Open the document manager and navigate to the report you want to encrypt.

Right-click on the file to be encrypted, and click on Encrypt.

In the next window, click Use a shared passphrase.

When brought on, the kinda new passphrase for the encryption. You’ll be requested to kind this passphrase two times.

05 You should now see the newly encrypted file within the folder.

Decrypting individual files

Encrypt, Decrypt or Password Protect Files, To decrypt a report from the file manager, follow these steps:

01 Right-click on the record and select Open With Decrypt File.

02 When induced, deliver the record a new name and click Save.

03 When precipitated, kind the encryption passphrase.

04 Enjoy your newly decrypted document.

If you’ve got a folder you want to encrypt, your great guess is both through the file supervisor or the use of the gpg-zip command.

The process of encrypting folders from in the file manager is the exact same as encrypting unmarried documents.

The handiest distinction is you’ll be asked if you want to encrypt the documents for my part or together in a package deal.

Encrypt, Decrypt or Password Protect Files , Decrypting individual files

If you want to encrypt a folder from the command line, you have to use the GPU-zip command (which should be established through default). Here’s how:

01 Open a terminal window and navigate to your house directory with the command

cd ~/

Encrypt the Documents directory with the command

gpg-zip -c -o Documents.gpg Documents

The -c alternative instructs gpg-zip to encrypt and the -o alternative shows what follows is the output (or resulting report name) for the encryption.

03 When brought on, type (and affirm) an encryption passphrase.

04 You can then decrypt the encrypted folder within the equal approach you decrypted the report with the command