How Do I Protect a File in Linux?

How Do I Protect a File in Linux?
Contents

How do I password protect a file in Linux?

Using gpg, you would do the following.

  1. Open a terminal window.
  2. Change to the ~/Documents directory with the command cd ~/Documents.
  3. Encrypt the file with the command gpg -c important. docx.
  4. Enter a unique password for the file and hit Enter.
  5. Verify the newly typed password by typing it again and hitting Enter.

How do I protect a folder in Linux?

Go to the application menu and start Gnome Encfs Manager. Click on the + sign to add a new folder that you’ll be locking with a password. A password protected folder is called stash in this application’s terminology. In here, you can create a new directory or browse to an existing one.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.