

The syntax is simple gpg -output outFileName.gpg -encrypt -recipient inputFileName.txt Encrypting and decrypting file using the public keys on Linux and Unox Gpg -d your_ | tar xz A note about keeping the password in a separate file for backups or cron jobs Optionally, you can delete the /path/to/dir/ as it is fully encrypted and backed up to the your_. The syntax is as follows to make encrypted archives with tar and gpg for whole directory:
#The command to encrypt xfile is how to
How to create compressed encrypted archives with tar and gpg for given directory or folder

asc, it is a ASCII encrypted file and if file extension is. $ gpg -d -output Īlso note that if file extension is. Sample outputs: gpg ĭecrypt file and write output to file you can run command: To decrypt file use the gpg command as follow:

Decrypt a file in Linux or Unix-like system Please note that if you ever forgot your password (passphrase), you cannot recover the data as it use very strong encryption. The default symmetric cipher used is AES128, but may be chosen with the -cipher-algo option. -c : Encrypt with a symmetric cipher using a passphrase.Sample outputs: -rw-rw-r- 1 vivek vivek 23 Jan 13 15:01 To encrypt a single file, use command gpg as follows: Please note that you can use either gpg or gpg2 command. # pkg install gnupg OpenBSD install gnupg # cd /usr/ports/security/gnupg/ & make install clean $ sudo zypper install gpg2 FreeBSD install gnupg command $ sudo pacman -S gnupg SUSE/OpenSUSE Linux install gnupg $ sudo dnf install gnupg Arch Linux install gnupg $ sudo yum install gnupg Fedora Linux install gnupg $ sudo apt-get install gnupg Installing gnupg in Red hat (RHEL)/CentOS Linux Type the following apt-get command or apt command: Install gnupg in Debian/Ubuntu/Mint Linux It includes an advanced key management facility. It can be used to encrypt data and to create digital signatures. The GnuPG stands for GNU Privacy Guard and is GNU’s tool for secure communication and data storage.
