Skip to content

Instantly share code, notes, and snippets.

@cryptrz
Last active September 22, 2023 01:59
Show Gist options
  • Save cryptrz/5be33f02411a078aafd45bac97e1f180 to your computer and use it in GitHub Desktop.
Save cryptrz/5be33f02411a078aafd45bac97e1f180 to your computer and use it in GitHub Desktop.
WSL2: Move Kali Linux on another hard drive
Install Kali Linux:
https://www.microsoft.com/en-us/p/kali-linux/9pkr34tncv07?activetab=pivot:overviewtab
Open Powershell as admin and go to the second hard drive (Let's say D for the example, change it if needed according to yours):
cd D:\
Create a wsl folder:
mkdir wsl
Enter the new folder:
cd wsl
Export the Kali Linux container to the actual folder (the newly created wsl folder):
wsl --export Kali-Linux kalilinux.tar
Delete Kali from WSL2:
wsl --unregister Kali-Linux
Create a folder for Kali Linux:
mkdir Kali-Linux
Import the tar file created above to create the new container:
wsl --import Kali-Linux Kali-Linux kalilinux.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment