From this you can see that public keys must be shared. You need the recipient’s public key to encrypt the file, and the recipient needs your public key to decrypt it. There is no danger in simply making your public keys public. There are even public key servers for this purpose, as we will see. Private keys must be kept secret. If your public key is public, then your private key must be kept secret and secure. We have mentioned steps below to Use GnuPG to Encrypt Files on Linux
Steps to Use GnuPG to Encrypt Files on Linux
Fedora Linux install gnupg
Final Words
So here we conclude our article on how to Use GnuPG to Encrypt Files on Linux. Or you may use the tried-and-true GnuPG to encrypt a single file or folder. You can encrypt a file or folder with the gpg command such that a password is required to decrypt it. I’ll demonstrate how to fast encrypt a file using the gpg command.