Kali Linux Live USB Persistence: Keep Your Settings Between Boots
Keep your Kali Live USB changes between boots with the built‑in persistence feature. Learn how to create a persistence partition, configure which directories to preserve, and test the setup—plus the trade‑offs and security considerations.
25 Aug 2025, 11:42 UTC

Why You Need Persistence on a Kali Live USB
Running Kali from a live USB is great for portability, but every reboot wipes your changes. If you want to keep custom tools, user accounts, or configuration tweaks, you need a persistence layer. The built‑in persistence feature lets you store selected directories on a separate ext4 partition that the live system mounts read‑write at boot time.
How Persistence Works Under the Hood
When Kali boots from an ISO, the initramfs script looks for a partition on the USB that is formatted ext4 and labeled persistence. If it finds one, it mounts it at /persistent and then reads /persistent/persistence.conf. That file lists the paths that should be written to the persistence partition. The script then mounts those paths read‑write, overlaying the live filesystem. Anything you write to those directories survives the next reboot.
Key Concepts
- Persistence partition: a dedicated ext4 partition labeled
persistence. - persistence.conf: a simple text file that enumerates directories to preserve.
- Only the directories listed are preserved; everything else remains read‑only.
Step‑by‑Step Guide to Create a Persistence Partition
Identify the USB device (e.g.,
/dev/sdx). You can list devices withlsblk -f. Run as root or withsudo.# lsblk -fPartition the USB. Use
fdiskorpartedto create a new primary partition. Infdisk, typen(new),p(primary),1(first),+2G(size). Thentto set the type to83(Linux filesystem), andwto write changes.# fdisk /dev/sdxFormat the partition as ext4 and label it
persistence:# mkfs.ext4 -L persistence /dev/sdx1Create the persistence configuration file. Mount the new partition temporarily, then add
persistence.confwith the directories you want to keep:# mkdir /mnt/persistence # mount /dev/sdx1 /mnt/persistence # echo "/home" > /mnt/persistence/persistence.conf # echo "/etc" >> /mnt/persistence/persistence.conf # echo "/root" >> /mnt/persistence/persistence.conf # echo "/var/log" >> /mnt/persistence/persistence.conf # umount /mnt/persistenceEach line in
persistence.confmust be an absolute path. Directories not listed will remain read‑only.Reboot the live USB. During boot the initramfs script will detect the
persistencepartition, mount it, and apply the rules. After the desktop loads, verify that the directories are writable.# touch /home/test.txt # ls /home/test.txtReboot again and confirm that
test.txtstill exists. If it does, persistence is working.
Trade‑offs and Limitations
| Aspect | What You Get | What You Lose |
|---|---|---|
| Data scope | Only listed directories are preserved. | Files outside those paths (e.g., /usr/local) are not saved. |
| Security | Easy to set up. | Persistence partition is unencrypted by default; anyone with USB access can read your data. |
| Performance | Mounting an extra partition adds a small boot overhead. | No measurable impact on day‑to‑day usage. |
If you need to protect sensitive data, consider encrypting the persistence partition with LUKS before formatting, then adjust the boot scripts to decrypt it during boot. This adds complexity and requires storing the key on the USB or entering it at boot.
Actionable Checklist
- Partition and format the USB with a
persistencelabel. - Create
/persistent/persistence.conflisting required directories. - Boot and test by creating a file in a listed directory.
- Reboot and confirm persistence.
- Optional: encrypt the partition if confidentiality matters.
With persistence enabled, your Kali Live USB becomes a portable, stateful environment—ideal for repeat use on multiple machines without compromising your workflow.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.