From 3b241bf94f48011e01a19d1520c0382ca3c31781 Mon Sep 17 00:00:00 2001 From: marten <43725244+tiyn@users.noreply.github.com> Date: Sat, 7 Jan 2023 17:48:15 +0100 Subject: [PATCH] Update dm-crypt.md --- wiki/linux/dm-crypt.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wiki/linux/dm-crypt.md b/wiki/linux/dm-crypt.md index fa9e665..ac74631 100644 --- a/wiki/linux/dm-crypt.md +++ b/wiki/linux/dm-crypt.md @@ -8,11 +8,12 @@ To create a encrypted device simply run: `cryptsetup -y -v luksFormat /dev/sda2`. Where `/dev/sda2` is the device you want to create. -## Open an encrypted device +## Open/Close an encrypted device -To open and map a device run `cryptsetup -y -v luksFormat /dev/sda1 crypt0` where +To open and map a device run `cryptsetup luksOpen /dev/sda1 crypt0` where `/dev/sda1` is your encrypted device and `crypt0` is where it will be mapped to with `dev/mapper/crypt0`. +Afterwards it can be closed by running `cryptsetup close /dev/mapper/crypt0`. ## Resize a LUKS encrypted volume