Linux command
fscrypt 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo fscrypt setup
Example
fscrypt setup [path/to/directory]
Enable encryption
fscrypt encrypt [path/to/directory]
Unlock
fscrypt unlock [path/to/encrypted_directory]
Lock
fscrypt lock [path/to/encrypted_directory]
说明
fscrypt is a high-level tool for managing Linux native filesystem encryption (fscrypt). It provides a user-friendly interface to the kernel's filesystem encryption capabilities, supporting ext4, F2FS, and UBIFS filesystems. fscrypt uses "protectors" (passwords, PAM integration, or raw keys) to secure encryption keys. A directory can have multiple protectors, enabling shared access or recovery options. The encryption is transparent once unlocked. Setup requires kernel support (CONFIG_FS_ENCRYPTION) and filesystem configuration. The tool stores metadata in /.fscrypt on each enabled mountpoint.
参数
- setup
- Initialize fscrypt on a filesystem or mountpoint
- encrypt
- Enable encryption on a directory
- unlock
- Unlock an encrypted directory using the protector
- lock
- Lock an encrypted directory, making contents inaccessible
- purge
- Remove keys from kernel keyring for a mountpoint
- status
- Display encryption status of a file or directory
- metadata
- Manage encryption metadata and policies
FAQ
What is the fscrypt command used for?
fscrypt is a high-level tool for managing Linux native filesystem encryption (fscrypt). It provides a user-friendly interface to the kernel's filesystem encryption capabilities, supporting ext4, F2FS, and UBIFS filesystems. fscrypt uses "protectors" (passwords, PAM integration, or raw keys) to secure encryption keys. A directory can have multiple protectors, enabling shared access or recovery options. The encryption is transparent once unlocked. Setup requires kernel support (CONFIG_FS_ENCRYPTION) and filesystem configuration. The tool stores metadata in /.fscrypt on each enabled mountpoint.
How do I run a basic fscrypt example?
Run `sudo fscrypt setup` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does setup do in fscrypt?
Initialize fscrypt on a filesystem or mountpoint