Setup Directions for Windows Subsystem For Linux
Before Installing
Before Beginning, Make sure of which version you would like/need to use
- https://learn.microsoft.com/en-us/windows/wsl/compare-versions#exceptions-for-using-wsl-1-rather-than-wsl-2
- WSL1 big benefit is that if your project files must be stored in the windows file system, WSL1 allows easy cross OS access for the Linux install to the windows file system. There are others, check out the link above.
- WSL2 Runs a VM instance of the full Linux kernel.
Once you have determined which version you want to use, you can install the subsystem with PowerShell.
- Open up PowerShell as Admin and run this command(assuming you are fine with the default of WSL, Ubuntu Distro):
-
WSL Install
wsl --install
-
- There have been some Cases where the install command attempts to prompt the Microsoft Store, which can be blocked on some networks, so you can bypass the store and pull it from Microsoft Online with the addition of:
-
Install WSL online No store
wsl --install --web-download
-
- If you would like to check out a different distribution of Linux, you can see what versions are available from the PowerShell interface with:
-
Check for WSL Distro
wsl --list --online
- You can install a different or additional distribution with:
-
Install different Distro
wsl --install
<Distribution Name>
-
- After this, You should get a message in the PowerShell Terminal that tells you some things require a restart. So go ahead and follow through on that and you can move on to the next step.
- When the computer comes back up, It should bring up the Ubuntu Terminal and prompt you to set up Linux Username.
-
- From here you can set you local Linux user and password. You do not need to set the username to your Argonne username since this is a low resource VM run locally. I Have personally found that using my Argonne username has made it easier for me to move seamlessly, but to each their own.
- The password for this account can also be unique, but please set it as something you will remember since resetting it is a bit of it’s own process and it will be used for any local sudo you need to do for updates and upgrades on your WSL terminal.
- When the computer comes back up, It should bring up the Ubuntu Terminal and prompt you to set up Linux Username.
- From here, you can actually set this up as though it were a Full Linux Terminal within your windows OS. The directions on the setup and build of a config file and the generation of ssh keys match the virtual helpdesk directions from here on in.