1. Download Kali Linux 2021 (Live)
In this guide we are using the Kali Linux Intel/AMD 64-Bit (Live) image, which most modern PCs support.
If you have a torrent client, use the Kali torrent download link to speed up the download (10 minutes) as kali.org sometimes throttle web downloads heavily.
2. Write Kali Linux 2021 Live ISO to USB
- Download Rufus and run it.
- Select your USB device.
- Click SELECT and browse to the Kali Linux 2021 Live ISO you downloaded.
- Set a Persistent partition size, in this example, 4GB, though this can be as large as you want depending on your USB size.
- Click START.
If you see a warning about Syslinux, click Yes.
Click OK if you see this warning.
It may take 10-30 minutes to write the Kali Linux 2021 Live ISO to USB depending on your hardware and size of USB.
3. Boot Into Kali Linux 2021 Live USB
On some PCs, you can simply restart the machine, and if the USB is plugged in, it should boot to Kali Linux 2021 Live automatically.
If this doesn’t work and the PC boots straight back into Windows, hold down the
SHIFT key while clicking Restart in the Windows start menu and select Boot from USB.
If this doesn’t work either, you may need to do some searching on how to boot from USB on your particular machine. Repeatedly pressing one of the function keys (F12, F2, etc) or the ESC or Delete keys on bootup will invoke the boot or BIOS menus on some machines, where you can select USB as the boot device.
When the PC reboots, you should be presented with the Kali Linux 2021 Live boot menu.
In the Kali boot menu, select Live USB Persistence and press
ENTER. The menu may look slightly different depending on your version of Kali.
Kali should boot straight to Desktop. However, if you do get a password prompt, the default username and password in Kali Linux 2021 and 2020 is “kali”. For Kali Linux 2019 and below, the default user is “root” and the password is “toor”.
To test if persistence is working correctly on Kali Linux 2021, try creating an empty test folder on the Desktop and restarting. Select Live USB Persistence and if the test folder is still there, persistence is working correctly.
Note: From now on, every time you boot from USB, you must select Live USB Persistence in order for persistence to work correctly.
4. Kali Linux 2021 Live Encryption (Optional)
If you want to protect your persistence partition with a password, you can do so with luksEncryption.
Be warned, this process will overwrite your current persistence partition. If you currently have files and settings stored on the persistence partition, you must back them up before continuing with this process.
Reboot the PC and select Live USB Encrypted Persistence and press
Open Terminal and use the root account with:
Identify your persistence partition by listing partitions (lower case L, not number 1).
Device Boot Size Id Type /dev/sdb1 * 111.7G c W95 FAT32 (LBA) /dev/sdb2 4G 83 HPFS/NTFS/exFAT
You may see several entries for devices and partitions listed here. It’s very important that you identify your persistence partition correctly as we are going to overwrite it.
Look for your USB drive. It should have two partitions: One that stores the Kali Linux 2021 operating system, and another persistence partition, which you created earlier.
In the above example, I can see my 4GB persistence partition that I created in Rufus in Step 2.
My partitions are listed here as
sdb2, however, depending on your hardware configuration, these may appear as
sdc3, etc. These will be different for everyone, so make sure you correctly identify the persistence partition for your particular hardware configuration and update the commands below to match.
If you are unsure where your persistence partition is, paste the results of
fdisk -l in the comments below and I will try to assist (lower case L, not number 1).
5. Cryptsetup / LUKS Encryption
cryptsetup is a utility used to conveniently set up disk encryption using LUKS Encryption.
As my persistence partition is
sdb2, the commands below will reflect that. Make sure to replace
sbd2 with your own persistence partition, otherwise you might overwrite data accidently. You have been warned!
cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb2
WARNING: Device /dev/sdb2 already contains a 'ext3' superblock signature. WARNING! ======== This will overwrite data on /dev/sdb2 irrevocably. Are you sure? (Type 'yes' in capital letters):
YES and press
ENTER to wipe the partition.
Enter passphrase for /dev/sdb2: Verify passphrase:
Enter a password twice. You can generate a strong password here. Make sure to keep it safe. Once the partition is encrypted, you cannot recover it without your password.
Existing 'ext3' superblock signature (offset: 1080 bytes) on device /dev/sdb2 will be wiped. Key slot 0 created. Command successful.
LUKS Encryption has now been applied to your persistence partition.
Now open your encrypted persistence partition.
cryptsetup luksOpen /dev/sdb2 my_usb
Enter passphrase for /dev/sdb2:
Enter your password.
6. Create and Label Encrypted Filesystem
ext3 filesystem and label it “persistence”. Ensure you spell “persistence” correctly!
mkfs.ext3 -L persistence /dev/mapper/my_usb
mke2fs [version] ([date]) Creating filesystem with [number] 4k blocks and [number] inodes Filesystem UUID: [serial number] Superblock backups stored on blocks: [numbers] Allocating group tables: done Writing inode tables: done Creating journal ([number] blocks): done Writing superblocks and filesystem accounting information: done
e2label /dev/mapper/my_usb persistence
7. Mount, Unmount and Close Encrypted Partition
mkdir -p /mnt/my_usb/
mount /dev/mapper/my_usb /mnt/my_usb
echo "/ union" > /mnt/my_usb/persistence.conf
cryptsetup luksClose /dev/mapper/my_usb
You’re all done!
Now, reboot the machine and choose Live USB Encrypted Persistence in the Kali Linux 2021 boot menu.
On bootup, you will be promted to enter your password.
Please unlock disk /dev/sdb2:
From now on, whenever you boot up Kali, you must select Live USB Encrypted Persistence in the menu to use your encrypted partition.
p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how.