Windows Subsystem for Linux 2
Table of Contents
Installing Windows Subsystem for Linux
Enable Intel Virtualization Technology
Enable Virtual Machine Platform
Using
Windows Subsystem for Linux
Other
Ubuntu Linux Information
Make the Current User the Administrator
List Installed WSL Linux Distributions
Copyright © 2020 by Bruce Blinn
Windows Subsystem for Linux, WSL, creates a Linux terminal environment where you can execute shell Linux commands, install Linux software packages, and run Linux applications. Linux is installed in WSL via an app from the Microsoft Store. Each app that is installed creates a separate root file system, and thus, it is a separate Linux installation.
When you run the Linux app, for example, from the Start Menu, a terminal window will be opened. If you run the app multiple times, multiple terminal windows will be opened.
Windows file systems are available in the Linux environment via the /mnt file system. Each Windows file system is mounted under its corresponding letter name. For example, C:/ is mounted at /mnt/c.
1. Check Windows Version.
2. Enable Intel Virtualization Technology.
3. Enable WSL.
4. Enable Virtual Machine Platform.
5. Set WSL2 as the Default.
6. Install a Linux Distribution.
7. Start the Linux Distribution.
· WSL 2 requires Windows 10, version 2004.
· To find out the current version of Windows, go to Settings->Update & Security->Windows Update.
· Enter Unified Extensible Firmware Interface (UEFI), which is a replacement for the BIOS, by pressing the shift key and restarting Windows.
· When the system enters UEFI, select Troubleshoot.
· Select UEFI Firmware Settings, then press the Restart button. The system will reboot into the setup utility where you can only use the console display and console keyboard.
· Press the right arrow to select Configuration.
· Press the down arrow to select Intel Virtual Technology.
· Press Fn + F5 to toggle the value until it is enabled.
· Press Fn + F10 to save and exit.
You can wait to enable Intel Virtual Technology until later. If it is not enabled, you will get the following error when the Linux distribution is first started. If you see this error, follow the steps to enable Intel Virtual Technology.
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.
· Go to Settings->Apps.
· Under Related settings, click on Programs and Features.
· In the left pane, click on Turn Windows features on or off.
· Find Windows Subsystem for Linux and make sure it is checked to enable or unchecked to disable.
· Click the OK button.
· Restart Windows.
· Go to Settings->Apps.
· Under Related settings, click on Programs and Features.
· In the left pane, click on Turn Windows features on or off.
· Find Virtual Machine Platform and make sure it is checked to enable or unchecked to disable.
· Click the OK button.
· Restart Windows.
· Open a shell window by selecting Start Menu->Windows Powershell->Windows Powershell.
· Execute wsl --set-default-version 2.
· If this fails, you may need to install Windows update KB4566116.
· Open the Microsoft Store by selecting Start Menu->Microsoft Store.
· In the search field, enter “Linux” and press enter. LTS in a distribution name stands for “Long Term Support”.
· Ubuntu is the same as the most recent Ubuntu LTS distribution available.
· Updating the distribution app in the Microsoft Store does not update the distribution installation. To update the distribution installation, execute do-release-upgrade from a command line in the distribution.
· Click on a distribution to get more information about it.
· Click on Install in the upper right corner of the information page. This only takes 2-3 minutes.
· Run Ubuntu Linux by selecting Start Menu->Ubuntu.
· Or, execute ubuntu from a Windows command line.
· The installation will be completed the first time you start Ubuntu.
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: groot
New password: IAmGroot
Retype new password: IAmGroot
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.19.128-microsoft-standard x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Tue Sep 15 16:50:46 PDT 2020
System load: 0.08 Processes: 8
Usage of /: 0.4% of 250.98GB Users logged in: 0
Memory usage: 1% IPv4 address for eth0: 172.18.8.27
Swap usage: 0%
1 update can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
This message is shown once once a day. To disable it please create the
/home/bruce/.hushlogin file.
bruce@Pleasure-Way:~$
To keep Ubuntu up to date, periodically execute the following commands.
$ sudo apt update
$ sudo apt upgrade –y
$ sudo apt install cups lpr
$ sudo service cups start
$ sudo service lpd start
lpadmin -p printer -E -v device -m ppd Lpadmin
$ DISPLAY=:0.0
$ export DISPLAY
For help go to:
· Open the Control Panel.
· Click on User Accounts.
· Click on Change your account type.
· Select the Administrator radio button.
· Press the Change Account Type button.
· UEFI-based computers have generally replaced BIOS based computers when Windows 8 came out. To access the UEFI firmware settings, press the shift key while restarting Windows.
· Open a shell window by selecting Start Menu->Windows Powershell->Windows Powershell.
· Execute wsl --list –verbose.
PS C:\Users\bruce> wsl --list --verbose
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
· To open the control panel, press the Windows Key + R. This will bring up the Run dialog. Enter “Control Panel” and press enter.
· Or, select Start Menu->Windows System->Control Panel.
Ctrl + Esc Open Start Menu
Win + E Open File Explorer
Win + I Open Settings Menu
Win + R Open the Run Window
Win + X Open secret Start Menu
Win + Prnt Scrn Capture screen shot of desktop
Win + X I Windows Powershell