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 35
    How to Activate and Press Ctrl+Alt+Del in Anydesk for Remote Access Connection to Windows system Windows
  • mbamclient
    How to deploy MBAM Client as part of a Windows Deployment Windows Server
  • File Share in Windows
    Create Folders and Enable File sharing on Windows Windows Server
  • wmic4
    How to find User Security Identifier (SID) in Windows [Part 1] Windows
  • maxresdefault
    Install and manage IP Address Management on Windows Server Windows
  • remote video disconnected
    Video Remoting was disconnected on Hyper V Windows Server

More Related Articles

image 35 How to Activate and Press Ctrl+Alt+Del in Anydesk for Remote Access Connection to Windows system Windows
mbamclient How to deploy MBAM Client as part of a Windows Deployment Windows Server
File Share in Windows Create Folders and Enable File sharing on Windows Windows Server
wmic4 How to find User Security Identifier (SID) in Windows [Part 1] Windows
maxresdefault Install and manage IP Address Management on Windows Server Windows
remote video disconnected Video Remoting was disconnected on Hyper V Windows Server

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

  • Featured post.
    How to fix The Group Policy settings for BitLocker startup options are in conflict and cannot be applied Security | Vulnerability Scans and Assessment
  • Slide2 1
    Create and Delete AD DS Partition with NTDSUTIL.EXE Windows Server
  • WonderFox HD Video Converter Factory Pro
    Video Conversion Desktop Software for Windows Windows
  • Synergy software kvm
    Why Software KVMs such as Synergy is replacing Hardware KVMs Linux
  • Was ist Windows Server und wie unterscheidet er sich vom normalen Windows
    Create a certificate template for BitLocker Network Unlock Windows Server
  • windows 10 keyboard shortcut 1024x512 1
    How to create a Desktop shortcut in Windows Windows
  • WPScan Banner
    How to scan WordPress Websites With WPScan For Security Vulnerabilities Security | Vulnerability Scans and Assessment
  • powershell01
    How to add servers to the Trusted Hosts list Scripts

Subscribe to Blog via Email

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

Join 1,825 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.