Search results for:
Table of Contents
Tags: Cloud Servers, Dedicated Server
For Windows 10 and higher as well as Windows Server 2019 and higher, you can natively run Linux distributions (including Ubuntu, Debian, and OpenSUSE) directly on Windows without dual booting. What's more, you can run Linux, PowerShell and Windows command prompt (cmd.exe) commands in the same WSL (Windows Subsystem for Linux) environment. The following shows you how to get WSL up and running quickly.
To ensure you have all of the required WSL components, please update Windows. A relatively universal way to do so is as follows:
1. Press Windows key + R.
2. Type control update, then select the OK button.
3. Select the Check for updates button.
1. Right-click the Start menu, select Windows PowerShell (Admin), and then select Yes.
2. From an elevated PowerShell command prompt, run the following:
wsl --install --online
3. From the NAME column, choose an available Linux distribution. For example:
4. The asterisk to the left of Ubuntu indicates that this distribution will be installed by default, as follows:
To install a different Linux distribution, such as SLES-12, you can run the following command instead:
wsl --install --distribution SLES-12
5. Restart the computer. Since you're at the PowerShell command prompt, this can be done as follows:
See section Error 0x80370102 if you receive the following error. Otherwise, proceed to the next step.
6. Select the Start menu, then Ubuntu or whichever Linux distribution you installed. For example:
7. Enter a Linux username and password (admin is not as option, as shown):
8. Return to an elevated PowerShell or Windows command prompt (cmd.exe) and run the following:
If a WSL update is available, you will see:
As suggested above, run the following command (from an elevated PowerShell or Windows command prompt):
9. Select the Start menu, then Ubuntu or whichever Linux distribution your installed. You should now be at a Linux command prompt:
10. See How to use the Windows Subsystem for Linux (WSL) to learn about some of the features of the WSL Linux command prompt including the ability to mix Linux, PowerShell, and Windows command prompt (cmd.exe) commands.
If you received the following error, then try the steps in this section to resolve the problem.
1. Press press Ctrl + Shift + Esc to open Task Manager.
2. Select the Performance tab, CPU, and note if virtualization is disabled:
If virtualization is enabled, then skip to step 5. Otherwise, proceed as follows:
3. Restart the computer, then immediately press and hold the F2 key or whichever key is appropriate for your system (How to enable or disable Hardware Virtualization in Windows 11/10 may be helpful in this regard). This opens the BIOS/UEFI settings panel. Find the setting that enables hardware virtualization and select it - the following example should give you a sense of this process:
A. Select Advanced, CPU Configuration, SVM Mode (i.e., Secure Virtual Machine), and then Enabled.
B. Select Exit, Save Changes and Exit, then Yes.
4. Open Task Manager (Ctrl + Shift + Esc) and verify that virtualization has been enabled:
If virtualization is still disabled, proceed to step 6 below. Otherwise, proceed to the next step:
5. Select the Start menu, then Ubuntu or whichever Linux distribution you installed.
If you do not receive an error, go to step 7 above. Otherwise, proceed as follows:
6. Press Windows key + R, type optionalfeatures, and select the OK button.
7. Ensure that Virtual Machine Platform and Windows Hypervisor Platform are both checked:
8. Restart the computer (shutdown /r /t 0 at a Windows command prompt will do this).
9. Select the Start menu, then Ubuntu or whichever Linux distribution you installed. If you do not receive an error, go to step 7 in the prior section. Otherwise, run the following command from an elevated PowerShell or Windows command prompt (cmd.exe):
bcdedit /set hypervisorlaunchtype auto
You should see:
10. Restart the computer.
11. Select the Start menu, then Ubuntu or whichever Linux distribution you installed. If you do not receive an error, go to step 7 in the prior section. Otherwise, the issue is, unfortunately, beyond the scope of this article. The following resources and/or a robust web search may be indicated.
Written by Karlito Bonnevie / June 16, 2022