Tag: Windows Subsystem for Linux

Install WSL 2

Install WSL 2 on Windows 10

With the Windows 10 Insider Preview Build 18917, the team also ships the first version of the Windows Subsystem for Linux 2 (WSL 2), which was announced at the Microsoft Build 2019 conference. In this post, I am going to show you how you can install WSL 2 on your Windows 10 machine.

The Windows Subsystem for Linux (WSL 1) was in Windows 10 for a while now and allowed you to use different Linux distros directly from your Windows 10 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.

WSL 2 Architecture

Requirements

To install WSL 2, you will need the following requirements:

Install WSL 2

To install the Windows Subsystem for Linux 2 (WSL 2), you need to follow these tasks.

  • Enable the Windows Subsystem for Linux Optional feature (WSL 1 and WSL 2)
  • Install a distro for the Windows Subsystem for Linux
  • Enable the ‘Virtual Machine Platform’ optional feature (WSL 2)
  • Configure the distro to use WSL 2

Enable the Windows Subsystem for Linux

To run the WSL on Windows 10 you will need to install the optional feature:

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

Install a Linux distro for the Windows Subsystem for Linux

If you don’t already have installed a WSL distro, you can download and install it from the Windows 10 store. You can find more here: Crazy times – You can now run Linux on Windows 10 from the Windows Store

Enable the Virtual Machine Platform feature

WSL 2 Enable Virtual Machine Platform

WSL 2 Enable Virtual Machine Platform

To make use of the virtualization feature for WSL 2, you will need to enable the optional Windows feature. You can run the following PowerShell command to do this. You will need to start PowerShell as an Administrator. After you run this command, you might need a restart of your computer.

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

Set WSL distro to use version 2

After you completed the first two steps, you will need to configure the distro to use WSL 2. Run the following command to list the available distros in PowerShell:

wsl -l -v

To set a distro to WSL 2 you can run the following command:

wsl --set-version DistroName 2

You can also set WSL 2 as the default:

wsl --set-default-version 2

To find out more about installing WSL 2, check out the Microsoft Docs page.

If you are now running your distro using WSL 2, you can now see that there is a Virtual Machine worker process running and if you search a little bit more, you can also find the VHDX file of the distro.

WSL 2 VHDX file

I hope this helps you and gives you a quick overview, if you have any questions, let me know in the comments and check out the WSL 2 FAQ. The Windows Subsystem for Linux 2 Kernel is also open-source, you can follow the project on GitHub.

By the way, you can now also start using Docker Desktop together with the Windows Subsystem for Linux 2.



WLinux WSL Setup Wizard for Windows 10

WLinux – The best WSL for Windows 10

A couple of Windows 10 releases back, Microsoft delivered the Windows Subsystem for Linux. The Windows Subsystem for Linux allows you to run Linux distros, like Ubuntu, Debian, Suse, and others, on Windows 10. Around the Microsoft Ignite 2018 timeframe, another distro was released to the Windows Store called WLinux. WLinux is a Linux environment for Windows 10 built on work by Microsoft Research and the Debian project. WLinux is a custom Linux distro built from Debian specifically for use on the WSL. While other distros are available for WSL, WLinux is the first optimized for use by users of WSL for WSL. It helps developer run Linux tooling on Windows and integrates into perfectly into Windows.

With the latest Windows 10 Insider builds, you can also run the Windows Subsystem for Linux 2 (WSL 2).

WLinux Setup

WLinux WSL Setup Wizard for Windows 10

WLinux comes with a custom setup to prepare your environment in a straightforward and easy wizard. It lets you set up some predefined software and settings and configure integration into Windows.

WLinux WSL Docker Bridge to Windows

WLinux Docker Bridge

If you want to run Docker in the Windows Subsystem for Linux, you can bring the Docker Client to the Windows Docker Engine. This allows you to run Docker directly from WSL and PowerShell at the same time.

Microsoft Tooling

WLinux Installing Azure CLI

Of course, WLinux brings the usual Linux development tools and easy setup for Ruby, NodeJS, Go, Java, Python, editors like emacs and even different shells. You can also easily add Microsoft tooling by adding Azure CLI, PowerShell Core, and even Visual Studio Code.

Windows Explorer Integration and WSL Utilities (wslu)

It easily lets you set up Windows Explorer integration and brings wslu, a collection of utilities for WSL, preinstalled. Wslu brings the following features to the WSL

  • wslusc This is a WSL shortcut creator to create a shortcut on your Windows 10 Desktop.
  • wslsys This is a WSL system information printer to print out some basic system information.
  • wslfetch This is a WSL Screenshot Information Tool to print information elegantly.
  • wslupath This is a WSL Windows path Converter that can convert Windows path to other styles of path.
  • wslview This is a fake WSL browser that can help you open link in default Windows browser.

WSLfetch

If you want to know more about WLinux, check out the website Whitewater Foundry.

Or download WLinux from the Microsoft Store.

You can also contribute to the project on GitHub.



Ubuntu on Windows Server using WSL

Install Windows Subsystem for Linux on Windows Server

In 2017 Microsoft made it possible to run different Linux distribution on Windows 10, using a feature called the “Windows Subsystem for Linux“. With the latest official Semi-Annual Channel Windows Server release called Windows Server, version 1709 Microsoft also allowed to run the Windows Subsystem for Linux (WSL) on Windows Server. With the next release of Windows Server called Windows Server, version 1803, Microsoft will also add some improvements to the Windows Subsystem on Linux, which also apply to Windows 10 as well as Windows Server. This blog post shows you how you can do this.

First, you have a Windows Server, version 1709 running. After that enable the Microsoft Windows Subsystem for Linux feature, running the following command (This will need a reboot)

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

You can download the appx packages for your favorite Linux distribution; this can be today:

  • Ubuntu
  • OpenSUSE
  • Suse Linux Enterprise Server

If you are running on Windows Server Core (which is highly likely), you can use the following command to download the Linux distributions.

# For Ubuntu 16.04
 
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.zip -UseBasicParsing
 
# For Ubuntu 18.04
 
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu1804.zip -UseBasicParsing
 
# For OpenSUSE 42
 
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/OpenSUSE.zip -UseBasicParsing
 
# For SLES 12
 
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.zip -UseBasicParsing

You can then unpack the file:

Expand-Archive ~/Ubuntu.zip C:\Distros\Ubuntu

Now you can open that folder and run the installer, for example ubuntu.exe. The first time this will do the setup where you also define the UNIX username and password as well as the root password.

WSL on Windows Server

After that, you can run updates for your distro, and you can start using Linux.

If you want to know more about the WSL, check out the Microsoft Documentation: Windows Subsystem for Linux Documentation and have a look at my WSL post in for Windows 10: Crazy times – You can now run Linux on Windows 10 from the Windows Store

You can also find the other Linux distro packages here: WSL distro packages.



Windows Server 1709

Microsoft released Windows Server 1709

Microsoft just released the new Windows Server version 1709 which is the first release in the Semi-Annual Channel. The Semi-Annual Channel release cadence to deliver innovation at a faster pace, but you will also need to keep updating your systems to newer versions of Windows Server. As of today, you can download Windows Server 1709 from the Volume license portal or deploy it in Microsoft Azure, since it is available in the Azure Marketplace.

Windows Server 1709 Features and Improvements

Windows Server 1709 will drive innovation in the container space and in the Windows Subsystem for Linux, as well as some Cloud Host improvements in Hyper-V with new support for Storage Class Memory and more. Windows Server 1709 will be only available as Windows Server Core (Standard and Datacenter).

If you want to know more about the new features and improvements in Windows Server 1709, check out my blog post and check also out the Microsoft What’s new in Windows Server 1709 page.

https://www.thomasmaurer.ch/2017/05/windows-server-news-from-microsoft-build-2017-it-is-all-about-containers/

New Windows Server Management Experience

If you want to know more about the new Management Experience called Project Honolulu, check out my blog post:

https://www.thomasmaurer.ch/2017/09/microsoft-project-honolulu-the-new-windows-server-management-experience/

Windows Server Servicing

For more information about the Semi-Annual Channel and Windows Server Servicing check out my blog posts:

https://www.thomasmaurer.ch/2017/10/windows-server-release-information-windows-server-semi-annual-channel-and-ltsc/

 

https://www.thomasmaurer.ch/2017/06/what-is-next-for-windows-server-and-system-center-with-a-faster-release-cadence/

Windows Server, version 1709 is only the first step in this new world of faster release cadences. The most important aspect of having new releases twice a year is customer feedback will shape the product. You can try the preview builds of Windows Server in the Semi-Annual Channel and provide feedback by joining the Windows Insiders program. You can also join the conversation in the Microsoft Tech Community where we have tons of professionals and experts sharing their learnings and answering questions.



Linux on Windows 10

Crazy times – You can now run Linux on Windows 10 from the Windows Store

In the past weeks, some crazy things are happening. Think you’re way back in the time of 2003, could you have ever imagined that Microsoft offers you to run Linux on Windows 10? Well, this is exactly what is happening in the past months.

With one of the Windows 10 releases, Microsoft added the Windows Subsystem for Linux, which allowed you to run a Ubuntu version on your Windows 10 devices. In the past few days and weeks, Microsoft now announced that you can now download and install SUSE Enterprise Server, openSUSE Leap and Ubuntu (my guess there will be more to come) from the Windows Store. All you need today is the latest Windows Insider Build 16237 (it also works with a couple of older insider builds), and you will be able to install these versions. For the mainstream, this will be available in the Windows 10 Fall Creators Update arriving in the Fall of 2017. The Windows Subsystem for Linux will also be part in the next Windows Server RS3 release.

Ubuntu Windows 10 Store

If you want to know more about how it works check out Scott Hanselman blog about Ubuntu now in the Windows Store: Updates to Linux on Windows 10 and Important Tips

One great thing, Scott describes in his blog if you want to configure the different Windows Subsystems for Linux and for example, set the default one, you can use the command line with the wslconfig utility.

WSLConfig on Windows 10

wslconfig #Set default distribution to Ubuntu wslconfig /s Ubuntu

At the Microsoft Build conference 2019, Microsoft also showed the latest Windows Subsystem for Linux 2 (WSL 2). If you have any questions, let me know in the comments.