Forrest logo
back to the fscrypt tool

fscrypt:tldr:76a7b

fscrypt: Prepare the root filesystem for use with fscrypt.
$ fscrypt setup
try on your machine

The command "fscrypt setup" is used to enable and configure the fscrypt feature on Linux systems. fscrypt is a kernel-level feature that allows for transparent encryption of files and directories within a file system.

When you run the "fscrypt setup" command, it will guide you through the initial setup process, including the following steps:

  1. Choosing a file system: You will be prompted to select the file system where you want to enable fscrypt. You can choose either the root file system or a specific file system mounted on your system.

  2. Selecting the encryption mode: You will be asked to choose the encryption mode, which determines how the encryption will be performed. fscrypt supports two modes: "v2" and "plaintext_names". The "v2" mode encrypts the names of files and directories along with their contents, while the "plaintext_names" mode only encrypts the file and directory contents, leaving the names in plaintext.

  3. Key management options: You will have the option to choose the key management scheme for fscrypt. This includes selecting either a built-in key management file or using a custom key management policy.

  4. Policy configuration: In this step, you will be given the option to create a default policy for the file system or customize specific policies for different directories.

  5. Activation: Finally, once all the configuration options are set, fscrypt will be activated on the selected file system, and the encryption rules will be applied accordingly.

After running the "fscrypt setup" command, any new files or directories created within the encrypted file system will be automatically encrypted according to the specified rules. The encryption and decryption of files will be handled transparently by the kernel, without requiring any further user intervention.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fscrypt tool