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:
- 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.
- 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.