Skip to content

Instantly share code, notes, and snippets.

@jrc03c
Created May 10, 2022 17:14
Show Gist options
  • Save jrc03c/457342277a98c594bc00fd6e52ee2383 to your computer and use it in GitHub Desktop.
Save jrc03c/457342277a98c594bc00fd6e52ee2383 to your computer and use it in GitHub Desktop.
working with LUKS
# assuming a partition already exists, apply LUKS formatting to it
sudo cryptsetup luksFormat /dev/whatever
# open it
sudo cryptsetup luksOpen /dev/whatever mapping_name
# format it to ext4 (or whatever)
sudo mkfs.ext4 /dev/mapper/mapping_name
# mount it
sudo mount /dev/mapper/mapping_name /some/path
# unmount it
sudo unmount /some/path
# close it
sudo cryptsetup luksClose mapping_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment