Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » How to install Windows Subsystem for Linux on Windows Server
  • maxresdefault 2 6
    How to create an AMI from the Command line AWS/Azure/OpenShift
  • Untitled Design 25
    Install and Configure Hyper-V on Windows Server Server 2019, and 2022 via the Server Manager, PowerShell or DISM Virtualization
  • Disable automatic updates
    Turn off Automatic Updates in Windows via Windows Registry and Group Policy Windows
  • maxresdefault
    How to delete Organizational Unit in Active Directory Windows Server
  • creating the perfect grafana dashboard  main
    How to install Grafana on Ubuntu Linux Network | Monitoring
  • image 19
    Download your MySQL database from Azure to a local PC with MySQL Workbench AWS/Azure/OpenShift
  • taskbar1
    Hide or Remove Search Button from Windows 11 Taskbar Windows
  • Screenshot 2020 08 13 at 03.29.53
    Windows Modules Installer: How to deactivate TrustedInstaller in Windows Windows

How to install Windows Subsystem for Linux on Windows Server

Posted on 29/06/202315/12/2023 Matthew By Matthew No Comments on How to install Windows Subsystem for Linux on Windows Server
Run Linux on Windows Server

Welcome to the world of Windows Subsystem for Linux (WSL) on Windows Server! With WSL, you can run Linux applications natively as Linux processes on your Windows Server, bridging the gap between the Windows and Linux ecosystems. In this article, I will show you how to install Windows Subsystem for Linux on Windows Server. Please see WSL: What is Windows Subsystem for Linux, how to fix WSL Error 0x8007019e: WSL Registrater Distribution failed with error, and how to install Windows Subsystem for Linux on Windows 11 via the Command line, and Microsoft Store.

Version Support for WSL

Before we dive into the installation steps, let’s clarify which versions of Windows Server support WSL. According to Microsoft documentation, WSL is available for installation on Windows Server 2019 (1709) and above, including various Windows Server Semi-Annual Channel (SAC) releases such as versions 1909, 2004, 20H1, 20H2, and the latest Windows Server 2022. This provides a broad range of options for Windows Server users to embrace the capabilities of WSL.

Now, let’s address the installation process and any differences you may encounter when installing WSL on Windows Server compared to Windows 10 or Windows 11. Generally, the installation process remains quite similar across these platforms, but there is one crucial distinction when it comes to running WSL on Windows Server.

Unfortunately, WSL 2 distributions are not available or supported on Windows Server 2019 but are supported on Windows Server 2022. However, this limitation doesn’t hinder the usage of WSL version 1 for all your distributions, so you can still enjoy the benefits of WSL on your server.

Install WSL on Windows Server 2022

Windows Server 2022 has made the installation process of WSL incredibly simple. With just a single command, you can install all the necessary components and get started with WSL. Here’s how:

Open an administrator PowerShell or Windows Command Prompt. Enter the following command:

   wsl --install

After executing the command, restart your machine to apply the changes.

running the command
Wsl –install command

Congratulations! You now have WSL installed on your Windows Server 2022.

By running the `wsl –install` command, you not only enable the required optional components but also download the latest Linux kernel, set WSL 2 as the default version, and install the Ubuntu Linux distribution by default.

Here are other related guides on how to run the Linux distributions on Windows: Install Ubuntu 20.04 LTS on Windows via WSL, Setup GitLab Runner on Windows WSL, and how to install Windows Subsystem for Linux on Windows 11 via the Command line, and Microsoft Store,

Install Your Preferred Distribution on Linux on Windows Server 2022

If you prefer a different Linux distribution, you can install it by following the process below.

Open an administrator PowerShell or Windows Command Prompt. Enter the following command:

wsl -l -o

By running the command “wsl -l -o,” you can view the list of available Linux distributions and select the preferred one.

running the command
Command to view Linux distributions

Then, with administrative rights, execute the command shown below to initiate the installation:

wsl.exe --install -d <name-of-distribution>

After the installation completes, a reboot is required. Upon logging back in, the setup procedure will finalize the configuration by setting up the first Linux user and password.

Windows Linux integration
Command to install Linux distribution

Please see WSL: What is Windows Subsystem for Linux, Windows Subsystem for Linux: How to install WSL on Windows 10, and Windows Subsystem for Linux: How to install WSL on Windows Server via Server Manager and PowerShell.

Install WSL on Previous Versions of Windows Server

If you are using Windows Server 2019 (version 1709+) or an earlier version, you can still install WSL manually. Follow these steps:

Enable the Windows Subsystem for Linux (WSL) optional feature by opening PowerShell as an administrator and running the following command:

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

After executing the command, reboot your server to activate the changes.

Linux compatibility on Windows
Enable Windows Optional Feature

Download your preferred Linux distribution by visiting the official WSL documentation and following the instructions provided. Once you have downloaded the Linux distribution, navigate to the location of the downloaded file and open PowerShell in that directory.

Extract the contents of the distribution’s `.appx` package using the following PowerShell command:

Rename-Item .\Ubuntu.appx .\Ubuntu.zip
Expand-Archive .\Ubuntu.zip .\Ubuntu

After extracting the contents, install the Linux distribution by running the following command in the same directory, replacing `app-name` with the name of the Linux distribution `.appx` file:

Add-AppxPackage .\app_name.appx
Install Linux distro on Windows Server
Install Linux distro on Windows Server

Note: If you encounter the error message “Installation failed with error 0x8007007e,” ensure that your system meets the minimum requirements for WSL and that you have enabled WSL and restarted your computer.

Add the path of your Linux distribution to the Windows environment PATH using the following PowerShell command, substituting `C:\Users\Administrator\Ubuntu` with the path of your Linux distribution:

$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")

Congratulations! You can now launch your Linux distribution from any path by typing `<DistributionName>.exe`. For example, to launch Ubuntu, simply type `ubuntu.exe`.

Conclusion

By following this installation guide, you have successfully enabled the Windows Subsystem for Linux (WSL) on your Windows Server environment. Whether you’re using the latest Windows Server 2022 or an earlier version, WSL empowers you to leverage the strengths of both Windows and Linux ecosystems seamlessly.

Explore the vast Linux software repository, utilize Linux command-line tools, and unlock a world of possibilities for your Windows Server. Get ready to take your server administration and development tasks to new heights with WSL!

I hope you found this article useful on how to install Windows Subsystem for Linux on Windows Server. Please feel free to leave a comment below.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Linux, Windows Server Tags:Microsoft Windows, Windows Server 2016

Post navigation

Previous Post: How to Deploy GitHub Repositories to cPanel using GitHub Actions
Next Post: Do not use Public DNS in Prod: Change DNS Server in Windows

Related Posts

  • Hyper V Virtual Switch Copy
    How to Create VDI Collections on Windows Server 2022 Network | Monitoring
  • fgbv
    Export and Import Scheduled Tasks in Windows Windows Server
  • TamperProtection
    Protect Microsoft Defender Settings with Tamper Protection Security | Vulnerability Scans and Assessment
  • fix windows activation 0x87E10BC6 error
    Fix Error 0x87E10BC6 on a PC running Windows non-core Edition Windows
  • Windows server 2025 set up
    Install Windows Server 2025 via iDRAC Virtual Media or PXE Windows Server
  • Azure Backup 1
    How to Install Azure Backup Agent AWS/Azure/OpenShift

More Related Articles

Hyper V Virtual Switch Copy How to Create VDI Collections on Windows Server 2022 Network | Monitoring
fgbv Export and Import Scheduled Tasks in Windows Windows Server
TamperProtection Protect Microsoft Defender Settings with Tamper Protection Security | Vulnerability Scans and Assessment
fix windows activation 0x87E10BC6 error Fix Error 0x87E10BC6 on a PC running Windows non-core Edition Windows
Windows server 2025 set up Install Windows Server 2025 via iDRAC Virtual Media or PXE Windows Server
Azure Backup 1 How to Install Azure Backup Agent AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • maxresdefault 2 6
    How to create an AMI from the Command line AWS/Azure/OpenShift
  • Untitled Design 25
    Install and Configure Hyper-V on Windows Server Server 2019, and 2022 via the Server Manager, PowerShell or DISM Virtualization
  • Disable automatic updates
    Turn off Automatic Updates in Windows via Windows Registry and Group Policy Windows
  • maxresdefault
    How to delete Organizational Unit in Active Directory Windows Server
  • creating the perfect grafana dashboard  main
    How to install Grafana on Ubuntu Linux Network | Monitoring
  • image 19
    Download your MySQL database from Azure to a local PC with MySQL Workbench AWS/Azure/OpenShift
  • taskbar1
    Hide or Remove Search Button from Windows 11 Taskbar Windows
  • Screenshot 2020 08 13 at 03.29.53
    Windows Modules Installer: How to deactivate TrustedInstaller in Windows Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.