What 's the most popular command to do such things in terminal in linux?

link|improve this question

65% accept rate
feedback

4 Answers

Try GnuPG.

To encrypt: gpg -c filename

To decrypt: gpg filename.gpg

link|improve this answer
feedback
  • with openssl

openssl des3 -salt -in unencrypted-data.tar -out encrypted-data.tar.des3

Decrypt:

openssl des3 -d -salt -in encrypted-data.tar.des3 -out unencrypted-data.tar

  • encrypt with AES

aescrypt -e -p password file.jpg

Decrypt:

aescrypt -d -p password file.jpg.aes

link|improve this answer
feedback

I think it would be gpg. The syntax for files and directories differs though.

Compression

For files(outputs filename.gpg):

gpg -c filename

For dirs:

gpg-zip -c -o file.gpg dirname

Decompression

For files(outputs filename.gpg):

gpg filename.gpg

For dirs:

gpg-zip -d file.gpg
link|improve this answer
feedback

I personally use aescrypt mostly.

      aescrypt -e "File" 

and decrypt:

      aescrypt -d "File"

Or there's mcrypt:

      mcrypt "File" 

and decrypt:

      mcrypt -d "File"

And for a file, I suggest tar'ing the dir, and encrypting that. Then after unencrypting, just untar the file:

      tar -cf "Dir.tar" Dir/

and to untar

      tar -xf "Dir.tar"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.