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

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.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • 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

  • image 130
    How to fix the Security Database on the Server does not have a Computer Account for this Workstation Trust Relationship on Windows Server [Part 2] Scripts
  • cockpit
    Installation and configuration of Cockpit on CentOS Linux Linux
  • 517443 637286201540125528 16x9 1
    User account and process management in Linux Linux
  • Distributed File System DFS
    All About Distributed File System Windows
  • Add or remove features   fix dotnet framework issues
    Fix the request to add or remove features on the specified server failed Windows
  • MDT Workbench Crashes when opening WinPE tab Properties
    Fix MDT Workbench Crashes when opening WinPE tab Properties Windows

More Related Articles

image 130 How to fix the Security Database on the Server does not have a Computer Account for this Workstation Trust Relationship on Windows Server [Part 2] Scripts
cockpit Installation and configuration of Cockpit on CentOS Linux Linux
517443 637286201540125528 16x9 1 User account and process management in Linux Linux
Distributed File System DFS All About Distributed File System Windows
Add or remove features   fix dotnet framework issues Fix the request to add or remove features on the specified server failed Windows
MDT Workbench Crashes when opening WinPE tab Properties Fix MDT Workbench Crashes when opening WinPE tab Properties Windows

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

Veeam Vanguard

  • ESNAS Virtualization 01
    How to remove Recent vSphere Client Connections Virtualization
  • Map and disconnect Virtual Disk in VMware Workstation
    Map and disconnect Virtual Disk in VMware Workstation Virtualization
  • dfghjk
    How to setup and arrange your external displays on your Mac Mac
  • Norton RDP
    Can’t connect via RDP upon installing Norton 360 Anti-Virus Solution
  • maxresdefault 2 4
    Setup RAID 5 and 10 with MegaRAID Storage Manager on RX300 S5 Network | Monitoring
  • MBAM Reports
    Microsoft BitLocker Administration and Monitoring Report Fields Windows Server
  • Featured image
    How to Disable or Uninstall OneDrive on Windows 10 and 11 Backup
  • Docker error manifest
    Docker image OS “windows” cannot be used on this platform: No matching manifest for linux/amd64 in the manifest list entries from Microsoft Docker Registry Network | Monitoring

Subscribe to Blog via Email

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

Join 1,819 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

Active Directory 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.