03EncryptingUSB.html (2670B)
1 <!DOCTYPE html> 2 <html lang="en-GB"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="author" content="Shipwreckt"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <title>Encrypting USB with luks</title> 8 <link rel="stylesheet" href="../../../styles.css"> 9 <link rel="icon" href="../../../Images/favi.png" type="image/x-icon"> 10 </head> 11 <body> 12 <header> 13 <nav> 14 <ul> 15 <li><a href="../../../index.html">Home</a></li> 16 <li><a href="../../../links.html">Links</a></li> 17 <li><a href="../../../projects.html">Projects</a></li> 18 <li><a href="../../../contact.html">Contact</a></li> 19 </ul> 20 </nav> 21 </header> 22 <main> 23 <h1>Encrypting USB with luks</h1> 24 <h3>Date: 17-02-2025</h3> 25 <hr> 26 <h2>What you will need 📋</h2> 27 <ul> 28 <li>A USB drive</li> 29 <li>A computer with Linux 🐧🖥</li> 30 <li>The ability to read instructions and to follow them 🧠</li> 31 </ul><hr> 32 33 <p>1) Install cryptsetup 34 <div class="code-box"> 35 <p>sudo pacman -S cryptsetup</p> 36 </div> 37 38 <hr> 39 40 <p>2) Backup any information on the USB stick because this process involves formatting the USB drive.</p> 41 42 <hr> 43 44 <p>3) Formatting USB.</p> 45 <div class="code-box"> 46 sudo fdisk /dev/sdX 47 </div> 48 <p>The X being your USB drive.</p> 49 <p>Press the following keys: <br> o <br> n <br> Press enter for the rest <br>w</p> 50 51 <hr> 52 53 <p>4) Encryption time! 54 <div class="code-box"> 55 sudo cryptsetup luksFormat /dev/sdX1 56 </div> 57 <p><a href="../../internet/safety/02Passwords">Make your password secure please!</a> 58 59 <hr> 60 61 <p>5) Decrypt USB</p> 62 <div class="code-box"> 63 sudo cryptsetup luksOpen /dev/sdX1 USB 64 </div> 65 <p>Note: The first password is your root user password, not the encryption password. I have sadly made this mistake in the past.</p> 66 67 <hr> 68 69 <p>6) Format the Encrypted Partition</p> 70 <div class="code-box"> 71 sudo mkfs.ext4 /dev/mapper/USB 72 </div> 73 <p>Depending on the size of the USB, this may take some time. For me, it took 3 minutes.</p> 74 75 <hr> 76 77 <p>Step 7: Mount the Encrypted Partition</p> 78 <div class="code-box"> 79 sudo mkdir -p /mnt/USB 80 <br> 81 sudo mount /dev/mapper/USB /mnt/USB 82 </div> 83 84 <hr> 85 <h2>Finished ✅</h2> 86 <p>Your password better be good dude. Make sure to memorize it!</p> 87 <hr> 88 89 <center> 90 <pre text-align=center> <a href="../../linuxlist.html">Back 🚪</a> 91 </main> 92 </body> 93 </html> 94