This project automates the installation and provisioning of the official Debian app for the Windows Subsystem for Linux.
The following tasks have been automated:
- Installation of the Windows Subsystem for Linux
- Installation of the official Debian app
- Distribution upgrade of Debian
- Installation of common packages
- Configuration of all Debian users
Clone the wsl_debian repository to a specific place on your machine via:
git clone git@github.com:countzero/wsl_debian.git C:\wsl_debian
Execute the provisioning/install_wsl_debian.ps1
PowerShell script:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\wsl_debian\provisioning\install_wsl_debian.ps1"
Define a UNIX username and password upon the first start of the debian
process.
Note
The installation script has launched the debian
process automatically for you.
Execute the provisioning/provision_wsl_debian.sh
Bash script as the root
user within the debian
distribution:
wsl.exe --distribution debian --user root /mnt/c/wsl_debian/provisioning/provision_wsl_debian.sh
Important
Do not use sudo
within Debian to become root
because that will cause the distribution
upgrade to fail: microsoft/WSL#4279 (comment)
Execute the following in a PowerShell with elevated rights to remove the Debian App:
Get-AppxPackage *TheDebianProject.DebianGNULinux* | Remove-AppxPackage
Execute the following in a PowerShell with elevated rights to disable the Windows Subsystem for Linux:
dism.exe /online `
/disable-feature `
/featurename:Microsoft-Windows-Subsystem-Linux `
/norestart
Please read the following ressources for up to date hints on what is causing the issue.
- https://docs.microsoft.com/en-us/windows/wsl/troubleshooting
- microsoft/WSL#4930
- https://www.spacedesk.net/de/forums/topic/wsl2-not-starting-after-spacedesk-installation/
VirtualBox is still too slow to be usable with Hyper-V. Therefore currently you have to switch between WSL 2 or VirtualBox development.
Execute the ./tools/enable_hyper_v.ps1
or ./tools/disable_hyper_v.ps1
PowerShell scripts to quickly toggle the availability of Hyper-V.
Warning
That scripts will automatically restart your machine.