====== Windows Subsystem for Linux (WSL) Setup on Windows 10 ====== {{ :blog:linux_search_file_contents.png?nolink&150|Penguin by Lars Meiertoberens from the Noun Project}} This setup guide outlines the steps required to set up the Windows Subsystem for Linux (WSL) feature on a Windows 10 workstation. ===== Install WSL Feature through PowerShell ===== - As an admin/privileged user, open up PowerShell using “Run as Admin”. - Within PowerShell, run the following commands to enable both WSL1 and WSL2 (VMs):\\ \\ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestar dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart - Within PowerShell, download and install the Linux Kernel Update package using the following commands:\\ \\ Invoke-WebRequest –Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi .\wsl_update_x64.msi - Within PowerShell, restart the Windows 10 workstation using the following command:\\ \\ Restart-Computer -Force ===== Setup Linux Environment (Ubuntu 20.04 LTS) ===== - Open PowerShell with the standard user account of the employee who will be utilizing WSL. - Run the following commands within the PowerShell window to download and setup Ubuntu 20.004 within WSL:\\ \\ curl.exe -L –o ubuntu-2004.appx https://aka.ms/wslubuntu2004 Rename-Item .\ubuntu-2004.appx .\ubuntu-2004.zip Expand-Archive .\ubuntu-2004.zip cd .\ubuntu-2004\ .\ubuntu2004.exe - You will now be in the initial setup stages of the Ubuntu environment, where you can set up the initial Linux user. Once the user is created and you are dropped into the Linux shell, you should run the following commands to get the latest security and bug updates:\\ \\ sudo apt-get update && sudo apt-get upgrade -y - Enjoy your day! ===== Sources ===== * [[https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps|Install Windows Subsystem for Linux (WSL) on Windows 10 | Microsoft Docs]] * [[https://docs.microsoft.com/en-us/windows/wsl/install-manual#downloading-distros-via-the-command-line|Manually download Windows Subsystem for Linux (WSL) Distros | Microsoft Docs]] * [[https://docs.microsoft.com/en-us/windows/wsl/install-on-server#extract-and-install-a-linux-distribution|Install the Linux Subsystem on Windows Server | Microsoft Docs]] * [[https://codnos.com/2019/11/06/install-wsl-on-windows-10-without-store.html|Installing WSL on Windows 10 without using Store | Codnos Ltd]] ~~socialite~~ {{tag>Windows Linux Ubuntu How-to}} ~~DISCUSSION~~ ~~Article~~