Encrypt a folder with gocryptfs
Create a password-protected encrypted directory that mounts like a normal folder.
01Command
$ sudo apt install gocryptfs && gocryptfs -init ~/Documents/vault && gocryptfs ~/Documents/vault ~/vault-mount02What it does
gocryptfs stores an encrypted copy of every file inside the 'vault' directory, and mounting it with FUSE shows the readable version at the mount point — write there, unmount, and only ciphertext remains on disk. It's the standard successor to EncFS for protecting documents synced to cloud drives or carried on laptops. Use -init only once per vault; every mount afterwards just asks for the password.
03Risk
04Undo
$ fusermount -u ~/vault-mount05Sources
- gocryptfs(1) — Ubuntu manual pageEvidence: gocryptfs -init creates an encrypted directory and gocryptfs CIPHER MOUNT mounts it via FUSE; fusermount -u unmounts.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Generate a modern Ed25519 public/private key pair in ~/.ssh for authenticating to servers and Git platforms without passwords.
Add or remove read, write, and execute permission for the owner, group, or others using symbolic or octal modes.
Add a UFW rule to permit inbound traffic on a TCP or UDP port, such as SSH on port 22.