System Grab Bag

View all TLDR pages from Linux (or from all pages)

cryptsetup

Manage plain dm-crypt and LUKS (Linux Unified Key Setup) encrypted volumes. More information: https://gitlab.com/cryptsetup/cryptsetup/.
  • Initialize a LUKS volume (overwrites all data on the partition):
    cryptsetup luksFormat {{/dev/sda1}}
  • Open a LUKS volume and create a decrypted mapping at /dev/mapper/{{target}}:
    cryptsetup luksOpen {{/dev/sda1}} {{target}}
  • Remove an existing mapping:
    cryptsetup luksClose {{target}}
  • Change the LUKS volume's passphrase:
    cryptsetup luksChangeKey {{/dev/sda1}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.