Ubuntu – Encrypting/Decrypting a single file in Ubuntu 12.04 LTS


I need to be able to encrypt/decrypt a single text file stored on my external HD in 12.04 LTS, preferably a GUI application, if any, or the command line otherwise. Thank you.

Best Answer

A simple way to encrypt a single file is with openssl:

openssl des3 < youfile.txt > yourfile.txt.des3

This will prompt you for a passphrase, which you will need to enter later when decrypting the file.

openssl des3 -d < yourfile.txt.des3 > yourfile.txt.decrypted

To make this "graphical" you could put it in a Nautilus script and make it accessible from the context menu. (See the docs of Nautilus for that.)


des3 is just an example. Run openssl list-cipher-algorithms to see the full list of ciphers.

Related Question