Wednesday, December 23, 2009

Linux Commands

File encryption in Linux

gpg is the main program for GnuPG system . GnuPG stands for GNU Privacy Gaurd . GNU's tool is used for secure communication and data storage and it can be used to encrypt data and to create digital signature . Following are the syntax of the gpg command .

#gpg -e <filename> - To encrypt a file .

The above command will create a file with extension .gpg .

#gpg -c <filname> ---- To encrypt the file with symmetric cipher only . This option will ask for passphrase .

NOTE: In the above command if you forgot the password , there is no way to recover the file .

#gpg <filename> To decrypt the file

Linux command

#gpg -c



Which will encrypt the file and to decrypt the file the command is



#gpg