Skip to content

Instantly share code, notes, and snippets.

@pathologicalhandwaving
Last active May 21, 2025 19:09
Show Gist options
  • Save pathologicalhandwaving/a5d9247f3e819cee20b2619e76dfbe3a to your computer and use it in GitHub Desktop.
Save pathologicalhandwaving/a5d9247f3e819cee20b2619e76dfbe3a to your computer and use it in GitHub Desktop.
LUKS USB Setup and Usage

LUKS USB

Usage

Open

sudo cryptsetup open /dev/sdbX LABEL
sudo mount /dev/mapper/LABEL /mnt

Close

sudo umount /mnt 
sudo cryptsetup close LABEL

New USB Setup

  1. open gparted
  2. partition usb with FAT32
  3. label your partition
  4. lsblk
  5. sudo cryptsetup luksFormat /dev/sdbX
  6. sudo cryptsetup open /dev/sdbX LABEL
  7. sudo mkfs.ext4 /dev/mapper/LABEL
  8. sudo mount /dev/mapper/LABEL /mnt
  9. sudo chmod -R 777 /mnt
  10. sudo umount /mnt
  11. sudo cryptsetup close LABEL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment