{"id":2801,"date":"2019-11-19T05:50:53","date_gmt":"2019-11-19T05:50:53","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2801"},"modified":"2019-11-19T06:17:21","modified_gmt":"2019-11-19T06:17:21","slug":"create-luks-encrypted-thumb-drive","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/create-luks-encrypted-thumb-drive\/","title":{"rendered":"Create LUKS Encrypted Thumb Drive"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Find the thumb drive with lsblk, dmesg, or sudo fdisk -l.  In the following examples we are using \/dev\/sdc1, replace as needed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cryptsetup --verbose --verify-passphrase luksFormat \/dev\/sdc1\nsudo cryptsetup luksOpen \/dev\/sdc1 encrypted_usb\nsudo mkfs.ext4 \/dev\/mapper\/encrypted_usb<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we can mount the drive.  We are mounting it to \/mnt change if needed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mount \/dev\/mapper\/encrypted_usb \/mnt<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or go ahead and close the channel and remove the drive<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cryptsetup luksClose \/dev\/mapper\/encrypted_usb<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Command Explanation<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cryptsetup --verbose --verify-passphrase luksFormat \/dev\/sdc1<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Wipe \/dev\/sdc1 and set the password when prompted for it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cryptsetup luksOpen \/dev\/sdc1 encrypted_usb<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open up a secure channel to the drive, and decrypt it so we can access it<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo mkfs.ext4 \/dev\/mapper\/encrypted_usb<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using the channel we created in the previous command, we can now format the drive.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo cryptsetup luksClose \/dev\/mapper\/encrypted_usb<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can now close the channel for the drive and remove it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find the thumb drive with lsblk, dmesg, or sudo fdisk -l. In the following examples we are using \/dev\/sdc1, replace as needed. sudo cryptsetup &#8211;verbose &#8211;verify-passphrase luksFormat \/dev\/sdc1 sudo cryptsetup luksOpen \/dev\/sdc1 encrypted_usb sudo mkfs.ext4 \/dev\/mapper\/encrypted_usb Now we can mount &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/create-luks-encrypted-thumb-drive\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,573],"tags":[147,401,796,807,7,144],"class_list":["post-2801","post","type-post","status-publish","format-standard","hentry","category-linux","category-security","tag-cryptsetup","tag-disk","tag-encrypted","tag-format","tag-linux-2","tag-luks"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2801"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2801\/revisions"}],"predecessor-version":[{"id":2807,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2801\/revisions\/2807"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}