Skip to content

Instantly share code, notes, and snippets.

@bitjockey42
Created January 12, 2019 19:08
Show Gist options
  • Save bitjockey42/7e7bb135c8fbfa16532ac342d6a6f2a4 to your computer and use it in GitHub Desktop.
Save bitjockey42/7e7bb135c8fbfa16532ac342d6a6f2a4 to your computer and use it in GitHub Desktop.
Encrypted drive setup

How to mount an encrypted drive

# Unlock and mount
sudo cryptsetup luksOpen /dev/sdb1 crypthome
sudo mkdir -p /mnt/files
sudo mount /dev/mapper/crypthome /mnt/files

# Unmount and lock
sudo umount /mnt/files
sudo cryptsetup luksClose crypthome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment