How to Use the gpg Command to Encrypt Linux Files

19

There are many reasons to encrypt files — even on a system that is well maintained and comparatively secure. 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.

Fortunately, commands for reliably encrypting files on Linux systems are easy to come by and quite versatile. One of the most popular is gpg.

gpg vs pgp and OpenPGP

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. While gpg is based on the OpenPGP standards established by the IETF, it is — unlike pgp — open source. Here’s the rundown:

  • OpenPGP is the IETF-approved standard that defines encryption technology that uses processes that are interoperable with PGP.
  • pgp is Symantec’s proprietary encryption solution.
  • gpg adheres to the OpenPGP standard and provides an interface that allows users to easily encrypt their files.

Read more at Network World