This is an old revision of the document!
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
pause
sudo apt update sudo apt upgrade
sudo apt install vim sudo apt install wget sudo apt install zip sudo apt install rsync
sudo mkdir /run/sshd
C:\Users\user\AppData\Local\Microsoft\WindowsApps\debian.exe
C:\Users\bco\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs
C:\Users\<username>\AppData\Local\Packages\<distribution>\LocalState\ext4.vhdx (replace 'ext4' with the filesystem of your distribution)ext4.vhdx to another location and open it with 7zip.wsl.exe --shutdown
Mount-VHD -Path "<pathToVHD>"
diskpart
select vdisk file="<pathToVHD>"
attach vdisk
sudo wsl --mount <diskPath> --bare sudo mkdir -p <mountPoint> sudo mount <diskPath> <mountPoint>
cd <mountPoint> ls -l
sudo umount <mountPoint> wsl --unmount <diskPath>
Dismount-VHD -Path "<pathToVHD>"
diskpart select vdisk file="<pathToVHD>" detach vdisk
sudo apt install openssh-server
sudo visudo %sudo ALL=(ALL:ALL) ALL <user> ALL=(root:root) NOPASSWD: /etc/init.d/ssh
#!/bin/bash sudo /etc/init.d/ssh start
<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*[EventData[@Name='TaskSuccessEvent'][Data[@Name='TaskName']='\Mount']]</Select>
</Query>
</QueryList>
mkdir /mnt/f mount -t drvfs f: /mnt/f