Wednesday, August 19, 2020

How to Install WSL with PowerShell

To get started we need to fire up a PowerShell session with elevated permissions. Type:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Your Server will reboot after this step, so take all the normal precautions and save your work.

2. Next, you will need to choose your flavor of Linux. The ‘best’ distribution or distro will vary from person to person, but for our example we’ll install Ubuntu.

Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing

This starts the process and can take a while depending on your internet connection.

We downloaded the file to c:\windows\system32

Step 3. We need to convert the APPX file to a zip archive and extract its content.

Step 4. If you want to add the Ubuntu executable to your environment, then type in the following command: c:\windows\system32\ubuntu\ubuntu1604.exe

Step 5. Now that we have our Linux system installed, let’s look at what we can do with it. Most system administrators take advantage of the fact that Linux commands are needed.

To run it, open a cmd window with elevated admin rights. Then simply type wsl and you will be logged in.


More Info: what jobs can you get with an a+ certification

No comments:

Post a Comment