https://www.youtube.com/watch?v=ZNaT03-xamE
lsblk
to view media. Let's say your flashdrive is in 'sda'
fdisk /dev/sda
to wipe it. Enter d for delete, then n for new partition, then p for primary, and hit enter to accept the defaults and type YES
lsblk
to look again. Now you have a sda1
cryptsetup luksFormat /dev/sda1
to encrypt it. Select a password for it
cryptsetup open /dev/sda1 drive
to open it and name it, for the time being, 'drive'. Enter the same password you gave it
lsblk
and you should see 'drive' there
mkfs.ext4 /dev/mapper/drive
to make a filesystem on it (because it doesn't have one yet). it'll auto be on mapper. It'll take some seconds or a minute
mount /dev/mapper/drive /mnt/
to mount it (to mnt for the time being)
Comments: 0