Installare HyperV in Windows 10 e 11 HOME (REQUISITO NECESSARIO) https://www.ilsoftware.it/articoli.asp?tag=Come-installare-Hyper-V-in-Windows-10-e-11-Home_24349 Nota Bene: prima dell'installazione, controllare in "Gestione Attività" -> "prestazioni" -> Virtualizzazione sia abilitato. in caso contrario abilitarlo tramite BIOS wsl --install dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2 Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing oppure curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004 Add-AppxPackage .\app_name.appx https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 1 -Open Start. 2 - Search for PowerShell, right-click the top result, and select the Run as administrator option. 3 - Type the following command to enable the Linux subsystem and press Enter: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux ---------------------------------------------------------- entrare con root wsl -u root PS C:\Windows\System32> ubuntu config --default-user marco -------------------------------------------------- # Import the public repository GPG keys curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - # Register the Microsoft Ubuntu repository sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/16.04/prod.list # Update the list of products sudo apt-get update # Install PowerShell sudo apt-get install -y powershell # Start PowerShell pwsh //-- per sapere ip wsl hostname -I wsl hostname -I PS C:\Users\adrien> wsl -l -v NAME STATE VERSION * docker-desktop-data Stopped 2 Ubuntu Running 2 docker-desktop Stopped 2 PS C:\Users\adrien> wsl --set-default "Ubuntu" PS C:\Users\Plouf> wsl -l -v NAME STATE VERSION * Ubuntu Running 2 docker-desktop Stopped 2 docker-desktop-data Stopped 2 PS C:\Users\adrien> wsl hostname -I 172.24.72.193 Linking your directory in windows with your server directory cd / sudo ln -s /mnt/c/Users/windows-user-name-here/Documents/projects /var/www/html Win+R→type powershell→Ctrl+Shift+Enter Set-ItemProperty -Path HKCU:\Environment\ -Name Home -Type String -Value $Env:UserProfile ------------- DA PowerShell Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux cd c:\ Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing Rename-Item ./Ubuntu.appx ./Ubuntu.zip Expand-Archive ./Ubuntu.zip ./Ubuntu cd ./Ubuntu .\ubuntu1604.exe $userenv = [System.Environment]::GetEnvironmentVariable("Path", "User") [System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Ubuntu", "User")