Windows subsystem for linux windows server

The Windows Subsystem for Linux (WSL) is available in Windows Insider builds of Windows Server. Now developers and application administrators can run tools they use in Linux environments alongside Cmd and PowerShell. If you want to jump straight in, the installation guide is available here. Why include WSL on Windows Server? We want Windows, including

The Windows Subsystem for Linux (WSL) is available in Windows Insider builds of Windows Server. Now developers and application administrators can run tools they use in Linux environments alongside Cmd and PowerShell.

If you want to jump straight in, the installation guide is available here.

Why include WSL on Windows Server?

We want Windows, including Windows Server, to be a great place for developers. We know developers, system administrators, people managing services and people building services all occasionally need tools available on Linux.  Many more would like to run Linux tools as part of their workflow as a matter of convenience.

Previously, there were a few options:

  1. Run something like Cygwin and rely on Win32 ports of common GNU tools.
    Cygwin is a great toolset but it runs into issues when using tools that haven’t been ported to Windows. Many tools simply aren’t available. This is especially common when trying to build and run Ruby & Java solutions, which utilize some Linux-only Gems, libraries and components.
    The tools available through Cygwin and other Win32 ports are also notorious for being out of date – which is understandable since updating them requires recompiling them for Windows. For Windows users, however, this is both inconvenient and often leads to troublesome compatibility issues when running, building or deploying software.
  2. Use Linux in a virtual machine.
    Virtual machines are designed for production workloads on Windows Server. They aren’t ideal for things closely tied to the Windows Server host. If you need basic Linux command-line tools integrated with their Windows system, a virtual machine will be cumbersome.

This is where running Linux on WSL provides value: WSL runs unmodified Linux (ELF64) binaries natively. It can install and run almost any Linux command-line tool integrated in Windows.

With the additions of WSL and Linux containers with Hyper-V isolation, Windows Server offers a wide variety of Linux options that make it a great place and platform for modern developers.

If you’re a server engineer that needs to run node.js, Ruby, Python, Perl, Bash scripts or other tools that expect Linux behaviors, environment or filesystem-layout, the ability to install and run Linux with WSL expands the tools at your disposal on Windows Server.

What this isn’t — WSL is not a Linux server

Just as with WSL on Windows Client, you can run daemons and jobs like MySQL, PostgreSQL, sshd, etc., via an interactive shell, but you cannot currently use WSL to run persistent Linux services, daemons, jobs, etc. as background tasks.

For these sorts or tools, read more about Linux containers with Hyper-V isolation from the Build 2017 announcement.

How do I get started using WSL on Server?

Windows Subsystem for Linux arrived in Windows Server Insider Build 16237. Follow our new Windows Server WSL Installation Instructions to get started running Linux alongside Cmd and PowerShell on your Servers.

Feel free to comment below or reach out to Sarah and Rich via Twitter.

How to Install WSL on Windows Server

WSL allows you to run applications natively as Linux processes on Windows. Learn how to install and use WSL on Windows Server here.

Table of Contents

  • Which versions of Windows Server support WSL?
  • How does installing WSL differ on Windows Server?
  • Install the Windows Subsystem for Linux in Windows Server
    • WSL in Windows Server 2019
    • WSL in Windows Server 2022
  • Download a Linux distribution
  • Install a Linux distribution on Windows Server
  • Launch and log in to your Linux distribution
  • WSL 2 is not supported in Windows Server 2019 or Windows Server 2022

Which versions of Windows Server support WSL?

According to Microsoft documentation, the Windows Subsystem for Linux (WSL) is available for installation on Windows Server 2019 (1709) and above. This includes the few Windows Server Semi-Annual Channel (SAC) releases (versions 1909, 2004, 20H1, 20H2, etc.) and Windows Server 2022.

For more information on how to run Linux GUI apps using WSL, check out How to Install Linux GUI Apps in Windows 10 and Windows 11 with WSL on Petri.

How does installing WSL differ on Windows Server?

Well, this is an interesting question. Depending on what version of Windows Server you’re using will dictate how you install WSL. And, unfortunately, there is one underlying platform difference in running WSL on Windows Server vs Windows 10 and Windows 11.

As you’ll read at the end of my post, WSL 2 distributions are not available and not supported on Windows Server 2019 and 2022. Aside from that glaring omission, there are no other real differences in using WSL on Windows Server vs. say Windows 10 or Windows 11. It’s similar to Hyper-V. Enabling Hyper-V on Windows 10 and 11, and Windows Server is very similar. Once it’s installed, you fire up the Hyper-V Manager and start building virtual machines (VM). This is the same with WSL on Windows client or Windows Server.

Install the Windows Subsystem for Linux in Windows Server

Remember what I said about the differences in how you install WSL on Windows Server? This will be a wonderful example of the advances Microsoft has made with installing WSL in Windows Server 2019 and Windows Server 2022. To all the Linux fans out there…this might just persuade you to build a few Windows Server 2022 servers to play around with. 

Install WSL in Windows Server in 3 steps:

  1. Install the WSL optional feature using PowerShell
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  2. Enable the Virtual Machine Platform
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Download and run the Linux kernel update package.

Now let’s look at the process in more detail for Windows Server 2019 and Windows Server 2022.

WSL in Windows Server 2019

Step #1. Install the optional feature, Windows Subsystem for Linux, via PowerShell:

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

Installing WSL feature via PowerShell

Installing WSL feature via PowerShell

After this completes, press ‘Y’ to restart your server.

Step #2. We need to enable the Virtual Machine Platform feature by running this command:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Enabling the Virtual Machine Platform feature via 'dism' command

Enabling the Virtual Machine Platform feature via ‘dism’ command

Go ahead and reboot for safe measure.

Step #3. Download and run the Linux kernel update package.

Installing the Linux kernel update package

Installing the Linux kernel update package

Note: Windows Server versions/SKUs do not support WSL version 2 distributions. However, you can still use WSL version 1 for all your distributions.

WSL in Windows Server 2022

Alright, so, this may give you a chuckle…open an administrative PowerShell window or command prompt and run this fabulous command!

wsl --install

One command handles 3 or 4 steps like magic!

One command handles 3 or 4 steps like magic!

That’s right. This single command installs the Virtual Machine Platform feature, the Windows Subsystem for Linux, and downloads an Ubuntu distribution for you! Next, reboot.

After a reboot, the Ubuntu distribution starts to load. But, before we continue with that, we first need to update the kernel for WSL by running this command:

wsl --update

If that doesn’t work for whatever reason, you can run the Linux kernel update package from above.

But then, we run into an issue that has been around since the various Insider preview builds of Windows Server 2022 earlier in 2021. When you try to change the default version for distributions to ‘2’, the command simply doesn’t work. Even the help included with ‘wsl’ shows the command to use. Yet, I have never been able to make this work. I ran this command to first check status:

wsl --status

Getting the status of your WSL environment

Getting the status of your WSL environment

Then, I tried the version command:

wsl --set-default-version 2

Unfortunately, Windows Server does not support enabling WSL version 2

Unfortunately, Windows Server does not support enabling WSL version 2

As you can see from the output, Windows interprets it as an incorrectly formed command. Yet, below in the help file, you can see the exact command I ran! Anyway, as you’ll see at the end of this article, I discovered through more digging than I feel is necessary the fact that ‘WSL 2’ is not compatible with Windows Server at all. It’s not a terribly huge deal, but it’s disappointing nonetheless. Well, let’s move on!

Download a Linux distribution

Again, I’ll show you the basics here depending on what version of Windows Server you’re using. You can do everything from the ‘wsl’ command in 2022, but there are manual steps if you’re running 2019. Microsoft documentation includes the various download links to distributions but PowerShell, again, simplifies things for us. For example, to download ‘Ubuntu 20.04’, open PowerShell and type:

Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing

If you’re using Windows Server 2022, you can list the available distributions using the ‘wsl’ command again:

wsl --list --online

Easy way to list the available distributions for download/install

Easy way to list the available distributions for download/install

And to download and install for example SUSE Linux Enterprise Server v12, type this:

wsl --install -d SLES-12

Install a Linux distribution on Windows Server

After the download completes, run these PowerShell commands to rename the file, and then extract the contents:

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

To install the distribution, simply run the ‘ubuntu2004.exe’ file.

Extracting the download file for your new distribution

Extracting the download file for your new distribution

Launch and log in to your Linux distribution

There are various methods you can use to launch your distributions. And yes, efficiencies abound in 2022 vs 2019. In Windows Server 2022, each distribution you install gives you a shortcut in your Start Menu. In Windows Server 2019, there are ways to manually create that shortcut. But, an easy way is to just run the name of the distribution at a command prompt. The first step is to create your UNIX user account.

After entering your UNIX username and giving it a password, you are done! You have free reign over this ‘container‘ process that runs a pseudo virtualization infrastructure under the hood. It is very lightweight and it essentially allows you to run a real Linux kernel in Windows!

Initial configuration of Ubuntu 20.04

Initial configuration of Ubuntu 20.04

Let me finish this post by giving you a suggestion to update all the software packages in your distribution. Run these commands to achieve this:

sudo apt-get update
sudo apt-get upgrade

Running 'apt-get update' and 'apt-get upgrade' in Ubuntu 20.04

Running ‘apt-get update’ and ‘apt-get upgrade’ in Ubuntu 20.04

And there you have it! I must say, if you’re familiar with WSL and have used WSL 2 (version 2) distributions on Windows 10 or Windows 11, you’ll right away notice the slower disk I/O inherent in WSL 1 distributions. As of this writing, I am unable to convert my distributions on Windows Server 2022 to version 2. It’s a shame.

WSL 2 is not supported in Windows Server 2019 or Windows Server 2022

Late-breaking update: I finally did find on GitHub a post by a Microsoft engineer/PM stating that WSL 2 distributions are NOT supported on Windows Server. Oh well…

With the latest Windows Server 2022 cumulative update (June 2022), you are also able to run WSL 2 on Windows Server. In this blog post, I am going to show you how you can install the Windows Subsystem for Linux 2 (WSL 2) on Windows Server. The Windows Subsystem for Linux was already available in earlier versions of Windows Server; however, WSL 2 brings a lot of new advantages. WSL 2 will be available on Windows Server 2022 broadly with the June cumulative update and if you want to run it today, you can install the 5C update here.

WSL 2 on Windows Server

WSL 2 on Windows Server

The Windows Subsystem for Linux was in Windows 10 and Windows 11 for a while now and allowed you to use different versions of Linux on your Windows client machine. With WSL 2, the architecture will change drastically and will bring increased file system performance and full system call compatibility. WSL 2 is now using virtualization technology (based on Hyper-V) and uses a lightweight utility VM on a real Linux kernel. You can find out more about WSL 2 in the release blog or on the Microsoft Docs Page for WSL 2.

Install Windows Subsystem for Linux 2 (WSL 2) on Windows Server

Here is how you can install WSL 2 on Windows Server.

Prerequisites:

  • Windows Server 2022 June cumulative update or 5c preview update (May)
  • A machine that supports Hyper-V Virtualization.
  • If you are installing your Windows Server in a virtual machine, make sure Nested Virtualization is enabled.

KB5014021 for WSL 2 on Windows Server

KB5014021 for WSL 2 on Windows Server

After you have installed Windows Server 2022 with the latest update, you will need to add the following features:

  • Microsoft-Windows-Subsystem-Linux
  • VirtualMachinePlatform

To enable these features, run the following command:

wsl --install

This command will need a restart to complete.

Install Windows Subsystem for Linux 2 (WSL 2) on Windows Server 2022

Install Windows Subsystem for Linux 2 (WSL 2) on Windows Server 2022

This will also download Ubuntu as for your WSL 2 Linux distro.

Windows Subsystem for Linux 2 on Windows Server 2022

Windows Subsystem for Linux 2 on Windows Server 2022

I hope this gives you a step-by-step guide on how you can install WSL 2 on Windows Server. If you want to install the Windows Subsystem for Linux (1( on Windows Server 2019, check out this blog post: Install Windows Subsystem for Linux on Windows Server.

Tags: Hyper-V, install, installation, Microsoft, Windows Server, Windows Server 2019, Windows Server Insider Preview, Windows Subsystem for Linux 2, Windows Subystem for Linux, WSL, WSL 2, WSL 2 on Windows Server, WSL on Windows Server Last modified: May 31, 2022

About the Author / Thomas Maurer

Thomas works as a Senior Cloud Advocate at Microsoft. He engages with the community and customers around the world to share his knowledge and collect feedback to improve the Azure cloud platform. Prior joining the Azure engineering team, Thomas was a Lead Architect and Microsoft MVP, to help architect, implement and promote Microsoft cloud technology.
 
If you want to know more about Thomas, check out his blog: www.thomasmaurer.ch and Twitter: www.twitter.com/thomasmaurer

How to Run Linux with WSL on Windows Server 2019

How to Run Linux with WSL on Windows Server 2019. Windows Subsystem for Linux stands for WSL, which is included in Windows Server 2019. Using WSL, you can run Linux distributions as well as run some Linux programs directly on Windows without creating and launching a virtual machine.

In this tutorial, we will learn how to run Linux on Windows Server 2019 using WSL, stay tuned.

Choose your perfect Windows Virtual Private Server Packages in Eldernode

Prerequisites:

Install Windows Server 2019

1) How to enable the Windows Subsystem for Linux (WSL) feature

Before you can install any Linux distribution for WSL, you must ensure that the Windows Subsystem for Linux feature is enabled:

A. Open PowerShell as Administrator.

B. Run the following command to enable WSL:

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

C. Agree to restart your computer when prompted:

How to Run Linux with WSL on Windows Server 2019

Note: You can do the same from the Server Graphical Interfaces:

Server Manager >> Add roles and features >> Select features

2) How to Install your Linux Distribution of Choice

There are various ways in which you can install WSL Linux distros via the Microsoft Store. In this guide, we will use download and install one from the Command-Line.

a- Launch PowerShell and download the distro with use the Invoke-WebRequest cmdlet  or using curl.exe. Here’s a sample instruction to download Ubuntu 18.04:

curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804

b- After the download, extract and install a Linux distro.

Rename-Item ubuntu-1804.appx ubuntu-1804.zip  Expand-Archive ubuntu-1804.zip ubuntu1804

c- Change your working directory to ubuntu 1804 and run the installer to finish your distro installation:

cd ubuntu1804  .ubuntu1804.exe

d- Similar to the image below, the installer will prompt you to provide a username and password for the UNIX user to be created:

How to Run Linux with WSL on Windows Server 2019

e- The sudo command can be used for privileged operations.

sudo apt update && sudo apt upgrade  sudo apt install ansible

Sample output:

How to Run Linux with WSL on Windows Server 2019

f- Add your distro path to the Windows environment PATH using Powershell:

$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")  [System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:UsersAdministratorubuntu1804", "User")

g- This will enable you to launch your distro from any path by typing the .exe launcher. For example, using ubuntu1804.exe. Note that this will require closing and relaunching PowerShell.

ubuntu1804.exe

You will see the following image:

How to Run Linux with WSL on Windows Server 2019

Note: Other Linux distributions that you can run are:

Ubuntu 18.04 ARM

Ubuntu 16.04

Debian GNU/Linux

Kali Linux

OpenSUSE

SLES

You can also, see:

Tutorial run Docker Containers on Windows Server 2019

How to Run Linux Containers on Windows Server 2019

Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.

Goodluck.

WSL 2 can currently only be installed on the latest Windows Server insider preview, or on Windows 10 build 18917 or higher. In this post I will explain how to install WSL 2 on Windows Server 2019.

  • Author
  • Recent Posts

Vladan Seget is an independent consultant, professional blogger, vExpert 2009-2021, VCAP-DCA/DCD and MCSA. He has been working for over 20 years as a system engineer.

It is already the second release of Windows Subsystem for Linux (WSL) that Microsoft released a short time ago. This release offers a new architecture that changes the way in which the Linux distribution interacts with the underlying Windows OS.

WSL 2 has better performance and full system call compatibility. It uses virtualization technology (based on Hyper-V) and a lightweight utility VM on a real Linux kernel. You will need to install two components: the WSL and the Virtual Machine platform optional component.

The Linux kernel in WSL 2 is built by Microsoft from the latest stable branch of the source available at kernel.org. This kernel has been specially optimized for WSL 2 in terms of size and performance to get the best possible Linux experience on Windows. The kernel will be updated via Windows updates, so you’ll get the latest security fixes without worrying by patching this separately.

To get access to Windows Server 2019 19035, you’ll have to join the Windows Insider program  at Microsoft and select ‘Fast’ ring or ‘Slow’ ring. You can join for free.

The first thing to do is install the WSL via PowerShell as an administrator. Open your PowerShell console and enter this command:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Then install the Virtual Machine platform optional component:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

A reboot is required to ensure that WSL can initiate a trusted execution environment. Just to make sure that WSL is installed, you can confirm the installation via this PowerShell command:

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

The next step is to download your Linux distribution. In our example, we’ll use Ubuntu.

Use this command:

Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu1804.zip -UseBasicParsing

Download your Linux distribution

Download your Linux distribution

When done, create a local folder where you’ll extract the zip archive file:

Md c:LinuxUbuntu

Then extract the zip file into a folder on your local hard drive.

Expand-Archive c:usersadministratorUbuntu1804.zip C:LinuxUbuntu

Create a directory and expand the zip file

Create a directory and expand the zip file

Launch the Ubuntu.exe file to install it (installation might take a while). You’ll receive a prompt to create a new user and assign a password. This has to be some user other than root and the user’s name has to be lowercase only.

Create a new user and assign a password for this user

Create a new user and assign a password for this user

Update the package catalog and the individual applications with the «apt update» and «apt upgrade» commands if you’re on an Ubuntu/Debian distribution. You’ll need to use «sudo» to elevate your privileges.

If you’re new to Linux, the command would look like this:

sudo apt update

You’ll receive a prompt for a password for user vladan we created earlier.

Run a Sudo apt update command

Run a Sudo apt update command

Wait for this to finish and then run «sudo apt upgrade» to update all installed packages to the latest version. You should do this from time to time to have the latest versions installed.

You can check which Linux distributions are already installed with this command:

wslconfig /l

You can set the Ubuntu WSL to version 2 with this command:

wsl --set-version Ubuntu-18.04 2

Show all registered distributions and convert to WSL 2

Show all registered distributions and convert to WSL 2

WSL will convert the Linux distribution to version 2. WSL 2 uses an entirely new architecture that uses a real Linux kernel. It’s a good idea to try to use the latest and greatest.

We can also make sure that whenever we install a new distro, it will default to version 2. To do so, just run this command via PowerShell:

Subscribe to 4sysops newsletter!

wsl --set-default-version 2

You can run WSL 1 and WSL 2 distributions side by side. At any time, you can upgrade and downgrade any distribution if needed. WSL 2 as a new architecture presents a better platform but WSL as such will be improved over time. WSL is great for developers and testers when they need to work on Windows systems and develop and test Linux applications at the same time.

avatar

Вопросы: Как включить функцию Windows Subsystem for Linux (WSL) на Windows Server 2019?

Как использовать Linux на Windows Server 2019?

В этом руководстве показано, как включить функцию Windows Subsystem for Linux (WSL) на сервере Windows 2019 и запустить сервер Linux, например Ubuntu, внутри Windows Server.

В нашей последней статье мы рассмотрели запуск контейнеров Docker на Windows Server.

Как запустить Docker Containers на Windows Server 2019

Подсистема Windows для Linux позволяет вам запускать среду GNU / Linux, которая включает большинство инструментов, утилит и утилит командной строки Linux непосредственно в вашей системе Windows без каких-либо изменений или издержек в хост-системе.

Одна предварительная версия уже установлена Windows Server 2019.

Достаточно повезло,что у нас есть руководство по установке Windows Server 2019.

Как установить Windows Server 2019 шаг за шагом

И его обзор

Полный обзор Windows Server 2019 — что нового?

Шаг 1. Включите функцию Windows Subsystem для Linux (WSL) в Windows

Прежде чем вы сможете установить любой дистрибутив Linux для WSL, вы должны убедиться, что включена функция «Windows Subsystem for Linux»:

Откройте PowerShell от имени администратора и выполните следующую команду, чтобы включить функцию Windows Subsystem for Linux (WSL) в Windows.

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

Согласитесь и перезагрузите компьютер при появлении соответствующего запроса.

Вы можете сделать то же самое из Диспетчер серверов графического интерфейса Server Manager>Add roles and features>Select features

Шаг 2: Установите свой Linux

Существуют различные способы установки дистрибутивов WSL Linux через Microsoft Store.

В этом руководстве мы будем использовать скачать и установить один из командной строки.

Запустите PowerShell и загрузите дистрибутив с помощью командлета Invoke-WebRequest или curl.exe. Вот пример инструкции по загрузке Ubuntu 18.04.

curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804

После загрузки распакуйте и установите дистрибутив Linux.

Rename-Item ubuntu-1804.appx ubuntu-1804.zip
Expand-Archive ubuntu-1804.zip ubuntu1804

Измените свой рабочий каталог на ubuntu1804 и запустите программу установки, чтобы завершить установку дистрибутива.

cd ubuntu1804
.ubuntu1804.exe

Программа установки предложит вам указать имя пользователя и пароль для создаваемого пользователя UNIX.

Команда sudo может использоваться для привилегированных операций.

sudo apt update && sudo apt upgrade
sudo apt install ansible

Образец вывода:

Добавьте свой путь к дистрибутиву в среду PATH среды Windows, используя Powershell:

$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:UsersAdministratorubuntu1804", "User")

Это позволит вам запустить ваш дистрибутив с любого пути, набрав .exe загрузчик

Например, используя ubuntu1804.exe.

Обратите внимание, что для этого потребуется закрыть и перезапустить PowerShell.

ubuntu1804.exe

Наслаждайтесь использованием дистрибутива Linux на вашем Windows Server. Другие дистрибутивы Linux, которые вы можете запустить:

  • Ubuntu 18.04 ARM
  • Ubuntu 16.04
  • Debian GNU/Linux
  • Kali Linux
  • OpenSUSE
  • SLES

Windows and Linux systems are peculiar in their own ways.

How many times have you thought of having the privilege to run a bash script on Windows?

Luckily, Windows Subsystem for Linux allow users to run Linux commands on a computer with a Windows operating system.

At Bobcares, we help customers to install Windows server 2019 Linux Subsystem as part of our Server Administration Services.

Today, we’ll see the benefits of Windows Subsystem for Linux and how our Support Engineers make it working.

How is Windows Subsystem for Linux helpful?

Before proceeding further, let’s get an idea about the benefits of Windows Subsystem for Linux (WSL).

In Windows 2019, Microsoft introduces many new features and Linux subsystem is a prominent one among them.

Basically, WSL works as a compatibility layer for running Linux binaries in Windows 2019 systems.

The typical benefits include:

  1. Allows both Windows and Linux environments to run simultaneously.
  2. Requires less overhead resources of computer like processor, memory and storage

As a result, developers can use common Linux tools and development languages such as Ruby and Python to operate through Windows.

However, Windows Subsystem for Linux has its own limitations too. It does not support Linux graphical interface. Also, it does not support all Linux applications.

How to setup Windows server 2019 Linux Subsystem?

Recently, one of our customers came to us for advice on running Linux scripts in a Windows environment.

Here, our Support Engineers advised the customer to go ahead with Windows 2019 server version that has native support for Linux Subsystem. Let’s now see how we enabled it for him.

Step 1. Setup Windows 2019 server

Primarily, we set up the new machine with Windows 2019 server version. We then double check the build version and install all the updates on the server.

Step 2. Enable Windows Subsystem for Linux feature

Now, to enable Windows Subsystem for Linux, we run the following command in PowerShell:

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

This prompts for a server reboot as shown below.

When the server is back online, Server now supports Linux environment.

Step 3. Download packages for Linux

Now, we download the desired Linux package. Windows 2019 allows distributions like Ubuntu, OpenSuse, etc.

For example, to download and install Ubuntu package, we use the command:

Invoke-WebRequest -Uri weburl -OutFile ~/Ubuntu.zip -UseBasicParsing

Here, we substitute the weburl with the actual download link of Ubuntu. For example, a sample link is https://aka.ms/wsl-ubuntu-1804

This downloads the Ubuntu 18 package and makes it available at Ubuntu.zip. Further, to unpack the files, our Support Engineers use the command:

Expand-Archive ~/Ubuntu.zip C:DistrosUbuntu

Step 4. Set user and connect

Finally, it’s now time to set the Linux user and connect to the Linux environment using the ubuntu.exe binary.

After connection, our Support Engineers set a default user for Linux and a complex password. The exact session will look as shown in the picture.

That’s it. Now, you can successfully connect and execute Linux scripts and commands.

[Looking for custom solutions on Windows 2019 servers? Our experts can help you.]

Conclusion

In a nutshell, the Windows server 2019 Linux Subsystem makes it possible to set up a Linux environment in a Windows server. Today, we saw how our Support Engineers set up Linux Subsystem on the Windows server and make it work.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Понравилась статья? Поделить с друзьями:
  • Windows subsystem for linux update скачать
  • Windows subsystem for linux update setup wizard ended prematurely
  • Windows subsystem for linux preview что это
  • Windows subsystem for linux installation guide for windows 10
  • Windows subsystem for linux has no installed distributions