← 返回命令列表

Linux command

systemd-cryptsetup 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Attach

systemd-cryptsetup attach [mapping_name] [/dev/sdXY]

Example

systemd-cryptsetup attach [mapping_name] [/dev/sdXY] none [crypttab_options]

Example

systemd-cryptsetup attach [mapping_name] [/dev/sdXY] [/path/to/keyfile] [options]

Detach

systemd-cryptsetup detach [mapping_name]

说明

systemd-cryptsetup creates or removes decrypted mappings of encrypted LUKS volumes. It is the systemd equivalent of `cryptsetup open` and `cryptsetup close`. Arguments follow the same format as `/etc/crypttab` entries. This tool is primarily used internally by systemd to unlock encrypted devices during boot based on crypttab configuration.

FAQ

What is the systemd-cryptsetup command used for?

systemd-cryptsetup creates or removes decrypted mappings of encrypted LUKS volumes. It is the systemd equivalent of `cryptsetup open` and `cryptsetup close`. Arguments follow the same format as `/etc/crypttab` entries. This tool is primarily used internally by systemd to unlock encrypted devices during boot based on crypttab configuration.

How do I run a basic systemd-cryptsetup example?

Run `systemd-cryptsetup attach [mapping_name] [/dev/sdXY]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more systemd-cryptsetup examples?

This page includes 4 examples for systemd-cryptsetup, plus related commands for nearby Linux tasks.