Linux – How to encrypt a folder in linux using only the command line

encryptionkali-linuxlinux

I need to encrypt a folder with documents (about 560kb if that makes any difference) and I was wondering whether it was possible to accomplish that using the command line?

I am searching for something like this:

encrypt /path/to/folder encryption_method password

than can be decrypted the same way

decrypt /path/to/folder encryption_method password

Best Answer

You are looking for dm-crypt and cryptsetup.

Basically you encrypt a block device and mount it as directory

Related Question