Commands for installing Kali Linux without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
PowerShell
winget install --id OffSec.KaliLinux -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id OffSec.KaliLinux -e --silentwinget uninstall --id OffSec.KaliLinux -e --silentBy installer
64-bit · MSIX
Silent install
Add-AppxPackage -Path KaliLinux_1.13.1.0.AppxBundleUninstall
Get-AppxPackage -Name KaliLinux.54290C8133FEE | Remove-AppxPackageARM64 · MSIX
Silent install
Add-AppxPackage -Path KaliLinux_1.13.1.0.AppxBundleUninstall
Get-AppxPackage -Name KaliLinux.54290C8133FEE | Remove-AppxPackagePowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
install-kali-linux.ps1
$url = 'https://wslstorestorage.blob.core.windows.net/wslblob/KaliLinux_1.13.1.0.AppxBundle'
$sha256 = '4320391962D3E212B9EC83475CAA7C78A99BFC88F657D4F7B44A60550ED3F2BD'
$file = Join-Path $env:TEMP 'KaliLinux_1.13.1.0.AppxBundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-kali-linux.ps1
$url = 'https://wslstorestorage.blob.core.windows.net/wslblob/KaliLinux_1.13.1.0.AppxBundle'
$sha256 = '4320391962D3E212B9EC83475CAA7C78A99BFC88F657D4F7B44A60550ED3F2BD'
$file = Join-Path $env:TEMP 'KaliLinux_1.13.1.0.AppxBundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file