NOTE: It's bad practice to store your passphrase in clear text - even in your command history file, so be careful if you do this. In this case, you might use a command like this: $ gpg -pinentry-mode loopback -passphrase 88bottlesOfBeer -symmetric myfile To do this kind of thing when you're not working on the console, you can avoid having gpg trying to open up a GUI tool to prompt for your passphrase by supplying it on the command. So, you have to be working on the desktop. During the encryption process, this command will also open up a tool on your desktop to prompt you twice to enter your passphrase. Once you verify that the encrypted version of your original file has been created, you can use the shred command to securely remove the original file in a way that prevents it from being scraped off the disk with some disk recovery tool. This command will leave you with two files - myfile and myfile.gpg. To encrypt a file with minimal effort, you could use a command like this: $ gpg2 -symmetric myfile Symmetric encryption means that you use the same key to both encrypt and decrypt a file. gpg adheres to the OpenPGP standard and provides an interface that allows users to easily encrypt their files.pgp is Symantec's proprietary encryption solution.OpenPGP is the IETF-approved standard that defines encryption technology that uses processes that are interoperable with PGP.While gpg is based on the OpenPGP standards established by the IETF, it is - unlike pgp - open source. Used both to encrypt files in place and prepare them to be sent securely over the Internet, gpg is related to, but not the same as, pgp and OpenPGP.
The files may highly sensitive, contain personal information that you don't want to share with anyone, or be backed up to some variety of online storage where you'd prefer it be extra secure.įortunately, commands for reliably encrypting files on Linux systems are easy to come by and quite versatile. There are many reasons to encrypt files - even on a system that is well maintained and comparatively secure.