Encrypting a directory on Linux

To encrypt a directory on Linux you can use encfs. You'll need two directories: a mount point, and a raw storage directory.

mkdir ~/mount-point
mkdir ~/.encfs-raw

Then we'll need to setup encfs for these directories. The default options should be plenty secure for whatever you'll need.

encfs ~/mount-point ~/.encfs-raw

To unmount this encrypted directory use fusermount

fusermount -u ~/mount-point

To change the password on your encfs directory use encfsctl

encfsctl passwd ~/mount-point

Update: You can use the --idle command to automatically unmount the directory after X minutes of inactivity



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.219.233.54
To prevent spam please submit by clicking the kitten: