Check Windows Update is active.
Open Start menu: search for exploit > click on "Exploit protection" result.
Go to Program settings tab. Search for C:\WINDOWS\System32\vmcompute.exe and vmwp.exe.
On both: Edit > Code flow guard (CFG) > Override System Settings, set the switch ON and check Strict CFG.
See previous steps with screenshots here.
Open Powershell.
DISM /Online /Enable-Feature /All /FeatureName:VirtualMachinePlatform /all /norestart
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Windows-Subsystem-Linux /all /norestart
wsl --update
wsl --set-default-version 2
wsl --shutdown
Go to C:\Users\USERNAME directory and look for .wslconfig file. If absent, create it.
You can then specify the hardware that will be available for WSL. Save file.
[wsl2]
memory=4GB # Limits VM memory in WSL 2 to 4 GB
processors=2 # Makes the WSL 2 VM use two virtual processors
wsl --install
// Install Ubuntu 22.04 (or list with wsl -l --online
and then wsl --install -d DISTRO_NAME
)
Set a username and password.
Now update packages: sudo apt update && sudo apt full-upgrade
We check that systemd
is enabled.
sudo nano /etc/wsl.conf
The following lines should be displayed. If not, edit to reproduce it.
[boot]
systemd=true
(Ctrl + O to save + Enter to confirm. Then Ctrl + X to close.)
exit
, wsl --shutdown
and wsl
.
Enter in shell: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
,
then (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/djibe/.profile
,
then eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install nvm
,
mkdir ~/.nvm
Or just a basic frontend setup with NodeJS: sudo apt install wget curl nodejs npm git-all -y
,
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ sudo apt-get install -y nodejs
Install GNOME: see tutorial