This discusses the recent improvements that has been made in Windows that has enabled it as an operating system to support Linux developers and administrators
Windows 10 Linux Work Environment Improvements with WSL
1. Windows 10 Linux Work
Environment
Improvements with WSL
Ifeatu Osegbo
2. NAME OR LOGO
Summary
We will be exploring Windows 10 and its new
features that supports Linux Admin and
developers
Introduction to
Linux
Why is Linux very
important in today’s
computing and
what companies
are doing to catch-
up
WSL
Technology
WSL Definition,
Architecture and
technologies
Demo
Demo Scenarios
2
3. NAME OR LOGO
Why Linux
○ The Linux Foundation
reports that Linux runs 90
percent of the public cloud
workload
○ Runs 82 percent of the
world's smartphones, 62
percent of the embedded
market
○ Development rate continues
to accelerate, as does the
number of developers and
companies
○ From 75 code changes per
hour to 85 in 2017
○ Linux Developers are much
more engaged now than ever
before
○ The Linux kernel is one of the
largest and most successful
open-source projects that has
ever come about
○ So tell me why any forward
thinking futuristic company
would not want to key into
this?
3
4. NAME OR LOGO
Microsoft’s Response
○ Microsoft love Linux
○ Microsoft is now a premium
sponsor of OSI
○ Microsoft has open sourced lots
of their development platforms
the .Net, Xamarin and Edge
JavaScript engine
○ Microsoft now a top contributor
at GitHub and other open
source projects
○ Microsoft Azure now supports
lots of Linux instances
○ Started including features and
tools to support Linux
development and
administration on their
platform
○ Microsoft is also focused on
creating a world class
operating system that you will
not just use, but love!
4
5. NAME OR LOGO
What’s New in Windows 10
○ Support for WSL – Windows
Subsystems for Linux
○ Improved Windows Console
○ Improved process management
using Pico processes and for
interaction with the NT Kernel
○ Windows Containers
○ Enhanced Session Mode - XRDP
○ Run different Linux distros
○ Different shells are available
with WSL
○ Run Bash scripts on Windows
○ Launching bash is easy from
both command line and from
File Explorer
○ Ability to run Windows and
Linux commands together in a
single command
○ Notepad support for Linux Line
Ending
5
6. NAME OR LOGO
What is WSL
WSL is Windows Subsystem for Linux and it is a way for you to run native
Linux applications on Windows without recompiling them and without a virtual
machine and is achieved by a driver that seats between the NT kernel and
Linux user mode which exposes virtual files and does this translation.
○ Run native Linux ELF64 binaries on Windows
○ No VM is required but it is done in Windows and on Windows
This process is accomplished by the following:
○ User session manager (LX session manager). Pico drivers (lxss.sys,
lxcore.sys)
○ Light weight emulation layer and hence does not consume ram like Virtual
machine
6
7. NAME OR LOGO
WSL Timeline
○ April 2016 - Product was launched at Microsoft Build as Bash on Windows
○ June 2017 - Multiple distros in the MS Store and was rebranded into WSL
○ July 2017 - Out of beta. Available on Windows Server
○ January 2018 - Background tasks, scheduled tasks
○ May 2018 - WSL on ARM
○ October 2018 - Modified configuration
7
8. NAME OR LOGO
Activating WSL on Windows 10
System Requirements
○ Must be a 64 bit OS and CPU Intel/AMD
○ Windows 10 x64 version running at least Windows 10 Anniversary Update
version 16xx/Build 14316 or later
8
9. NAME OR LOGO
Activating WSL on Windows 10
Configuration Requirements
○ Turn on developer mode(This is not required for the new update release no
1809 released on the 17th of October 2018)
9
10. NAME OR LOGO
Activating WSL on Windows 10
Configuration Requirements:
○ Enable Windows Subsystem for Linux feature from the Control Panel
○ You may also enable this via an elevated Powershell using this command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-
Windows-Subsystem-Linux
○ Run bash in a privileged prompt and following instructions to install, create
user and complete install
10
11. NAME OR LOGO
WSL Demo
Installing and configuring
WSL on Windows 10
11
12. NAME OR LOGO
How does WSL Work
Console Application
○ Input/output subsystem
Session Manager
○ Manages Linux instances
LXCore
○ Pico processes
○ Data structures/logic/catching
Linux Instance
○ Init process leader
○ Unmodified ELF64 binaries
NT Kernel
12
Console Application
cmd.exe, bash.exe
WSL Session
Manager
LXCore Driver
Linux instance
Init process
NT Kernel
13. NAME OR LOGO
Process Example
13
Kernel Mode
User Mode
Console application
cmd.exe/bash.exe
Linux instance
WSL Session
Manager
Init Process
LXCore Driver
NT Kernel
/bin/ls
16. NAME OR LOGO
Windows Console
○ 2 Processes Hosts/Application
conhost vs cmd
○ Host same for all applications
cmd/powershell/bash/wsl
○ 2 modes of communication
APIs: Set/Query state
○ Streams: Read/Write
○ Linux: no APIs, control sequences
embedded in the stream {VT}
ESC[37;1;45m
16
Console
Host
Console
Application
APIs
Input/output/error
17. NAME OR LOGO
Windows Console Updates for Windows 10
○ Color support – from 16 to 24 bit color support which can now support vim,
fish and mc commands
○ Better VT support, more WSL compatibility
○ VT Mouse support – accepts different input sources where there are lots of
on screen text controls
○ A more user friendly experience – resizing, reflowing, copy and paste etc
○ Better font support
17
20. NAME OR LOGO
WSL Limitations
Limited to live bash sessions, any running process is killed once the terminal is
exited
Not supported for live environments, it is a development tool
System D is not supported (its built on the init sysyem)
20
22. NAME OR LOGO
WSL Resources
Resources/Education:
○ https://www.linuxfoundation.org/
○ https://channel9.msdn.com/
○ https://aka.ms/wsldocs
○ https://aka.ms/wslblog
Get in touch:
Tweeter: @IfeatuOsegbo
22