dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
And restart the computer
wsl –set-default-version 2
wsl –set-version ubuntu 2

export BROWSER='/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'
Install Windows Terminal from Microsoft Store
Downloads recommended fonts for Powerlevel10k MesloLGS NF here :
https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
And install the 4 font flavors.
Update terminal configuration with this conf
Alternative configuration
{
"guid": "{some-value}",
"hidden": false,
"name": "Ubuntu-20.04",
"source": "Windows.Terminal.Wsl",
"colorScheme": "One Half Dark",
"fontFace": "MesloLGS NF",
"commandline": "wsl.exe ~"
}
Create a file /etc/wsl.conf and add the following content :
[interop]
appendWindowsPath = false
then from admin Powershell to restart the machine :
wsl -t Ubuntu
$ sudo apt update
$ sudo apt install git zsh -y
Install Oh my zsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Some useful plugins
$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
Open ~/.zshrc
# Use Powerlevel10k theme
ZSH_THEME="powerlevel10k/powerlevel10k"
# Use plugins
plugins=(git docker aws zsh-autosuggestions zsh-syntax-highlighting)
sudo libvirtd -d
sudo virtlogd -d
sudo chmod 666 /dev/kvm
sudo virt-install --name=deepin-vm --os-variant=ubuntu20.04 --vcpu=2 --ram=2048 --graphics spice --location=/home/xenom/debian-11.2.0-amd64-netinst.iso --network bridge:virbr0
sudo make -j $(nproc)
sudo make -j $(nproc) modules_install
sudo vim /etc/modules-load.d/modules.conf
Pas sur que cela fonctionne visiblement lié a systemd (https://wiki.archlinux.org/title/Kernel_module)
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vboxdrv
vboxnetflt
vboxnetadp
vboxpci
Load modules
sudo modprobe vboxdrv
sudo modprobe vboxnetflt
sudo modprobe vboxnetadp
virtualbox
# a relancer a chaque changement de kernel
sudo apt install --reinstall virtualbox-dkms
Si conflit avec les modules
sudo apt-get autoremove peut aider
et relancer
sudo apt install --reinstall virtualbox-dkms
https://falco.org/blog/falco-wsl2-custom-kernel/
zgrep CONFIG_PROC_EVENTS= /proc/config.gz
export $HOSTIP = cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2 ✔
export $WSLIP = ip addr | grep eth0 | cut -d ' ' -f 6 | tail -1 | cut -d '/' -f 1 ✔