Easily configure your WSL environment.
Before you start it, RUN Terminal(CMD/POWERSHELL) as ADMINISTRATOR.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Setup WSL on Windows. Run this and restart Windows.
Download Set4wsl and run the PowerShell script.
.\enable_wsl.ps1
If can't donwload, try manually.
dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
If not Windows 11 or Windows 10 2004 and higher, follow this and setup WSL2.
Download Set4wsl and run the PowerShell script.
.\set_wsl.ps1
If can't donwload, try manually.
curl -L -o \wsl_update_x64.msi https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
.\wsl_update_x64.msi /quiet
Remove-Item .\wsl_update_x64.msi
wsl --set-default-version 2
Update WSL on Windows.
wsl --update
Install Default(Ubuntu) via WSL.
wsl --install
# or use this: wsl --install ubuntu
Install Alterantive(Debian/Kali) via WSL.
wsl --install debian
# or
wsl --install kali-linux
Run this script on Windows for configure WSL. Before run this, you need minimum 3GB storage space.
.\config_wsl.ps1
This all command use on Linux.
Update and upgrade Linux.
sudo apt update && sudo apt -y upgrade
Then install gui application.
sudo apt install -y [AppName]
# e.g. sudo apt install -y epiphany-browser
Run GUI application.
[AppName] &
# e.g. epiphany-browser &
If you use Kali Linux, try Win-Kex with seamless mode.
sudo apt install -y kali-win-kex
Use Win-Kex Window Mode.
kex --win
Stop Win-Kex Window Mode.
kex --win --stop
Use Win-Kex Seamless Mode.
kex --sl
Stop Win-Kex Seamless Mode.
kex --sl --stop
Turn on Kali Linux sound.
kex --win --sound
Setup Kali Environment
Update all packages
sudo apt update && sudo apt full-upgrade -y
Setup to install default Kali tools
sudo apt install -y kali-linux-default
Setup to install all Kali tools
sudo apt install -y kali-linux-everything