Grimoire-
Command
.es

GNU+Linux command memo

Encrypt storage (like USB key)

Chiffrer une clé USB

$ sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/$sdb1 (1)
$ sudo cryptsetup luksOpen /dev/$sdb1 $luks_container (2)
$ sudo mkfs.ext3 /dev/mapper/$luks_container (3)
$ sudo mount /dev/mapper/$luks_container /media/cle (4)
$ sudo umount /media/cle && sudo cryptsetup luksClose /dev/mapper/$luks_container
1 $sdb1 is the partition to cipher, it can be the 1st patition of the USB key you just plugged-in
2 $luks_container is the name you chose to open your container
3 Once mounted like a new peripheral, the LUKS container can be formatted
4 Then it just need to be mounted to access the content.