Getting WSL set up for react development: Ubuntu
quick guide for how to get windows subsystem for Linux up and running!
Windows subsystem for Linux is a Windows supported application that allows Windows users to run a GNU/Linux environment that includes most Linux command-line tools directly on windows. unmodified without having to go the route of the traditional dual-boot setup
installing WSL is quick and easy. From windows PowerShell, in admin mode, you’re gonna type in these commands.
First, we enable the Windows Subsystem for Linux by typing the following command in PowerShell:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Next if you’re running windows 10, we’ll want to update to wsl2 which has a plethora of upgrades built upon WSL1.
To update we’ll want to run the following command in powershell(Admin)
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
After that is done installing you’ll want to restart your computer. from there you will want to install WSL2 Linux kernel update package for x64 machines
Finally you’ll want to set wsl2 to be your default version with the following command
wsl — set-default-version 2
From here we are ready to install and use a distribution of Linux from the Microsoft store. it has many of the mainstream distro’s from kali to ubuntu to grandfather debian. once installed run the application and you’re set to start developing on WSL just make sure to run apt update to get your terminal up to date.
With ubuntu you can then install any of the packages you’d want for development by typing {sudo apt [package name]}
For instance if you want to install node you’d want to install it by typing
sudo apt nodejs.
But i would recommend downloading it using nodeSources repo and instructions.