Well, first off, why would anyone do that when they could just use their fancy Mac or Linux computer instead? But I digress…
Anyway, here’s how it works: You need to download the ISO image of Kali Linux from their website (which is totally safe and not at all malware-filled), then you can use a program like Etcher or Rufus to write that image onto your USB drive. This process involves copying all the files from the ISO onto the USB, which basically turns it into a miniature version of Kali Linux that you can boot up on any computer with a USB port (assuming they have UEFI firmware and not old-school BIOS).
So let’s say you want to create this magical USB drive. First, download the ISO image from kali.org/downloads/. Then, plug in your USB drive and open up Etcher or Rufus (whichever one you prefer). In Etcher, click “Flash!” and select both the Kali Linux ISO file and your USB drive. In Rufus, do basically the same thing but with a few more options to choose from.
Once that’s done, wait for it to finish writing all those files onto your USB drive (which can take anywhere from a few minutes to an hour depending on how fast your computer is). Then, unplug the USB and insert it into any old machine with UEFI firmware. When you turn it on, it should automatically boot up Kali Linux instead of Windows or whatever else was previously installed on that computer.
Now, if you want to make this process even easier (and more fun), you can use a program called “Persistence” to save all your changes and settings across multiple reboots. This is especially useful for penetration testing purposes because it allows you to keep track of everything you’ve done without having to start from scratch every time you restart the machine.
To enable Persistence, simply add a new partition to your USB drive (using something like GParted or Disk Utility) and format it as ext4 with a size that’s at least twice as large as your Kali Linux ISO file. Then, mount this new partition onto /home/kali on the live system using the following command:
sudo mkdir -p /mnt/persistent && sudo mount /dev/sdX2 /mnt/persistent
Replace “sdX” with your USB drive’s device name (which you can find by running “lsblk”). This will create a new directory called “/home/kali” on the persistent partition and mount it to that location.
Now, whenever you reboot Kali Linux from this USB drive, all your changes and settings will be saved in /home/kali instead of being lost forever. Pretty cool, huh?