2004 Update
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- download and install
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
wsl --set-default-version 2
https://docs.microsoft.com/en-us/windows/wsl/install-win10 wsl –set-version Ubuntu-20.04 2 wsl -l -v https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel
installing systemd
https://github.com/arkane-systems/genie
installing dot net core
sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
Replace dotnet-runtime-3.1 with your dot net package name
sudo apt-get install -y gpg
wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget https://packages.microsoft.com/config/ubuntu/{os-version}/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-runtime-3.1
sudo apt install -y systemd-genie
use genie
Commands: -i, –initialize Initialize the bottle (if necessary) only. -s, –shell Initialize the bottle (if necessary), and run a shell in it. –shutdown, -u Shut down systemd and exit the bottle.
genie -s
hostnamectl