Pro Windows Subsystem for Linux
â Scribed by Hayden Barnes
- Year
- 2021
- Tongue
- English
- Leaves
- 304
- Category
- Library
No coin nor oath required. For personal study only.
⌠Table of Contents
Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: WSL Architecture
WSL 1 vs. WSL 2
Kernel Drivers
Pico Processes
LxssManager
Syscall Translation in WSL 1
WSL 2
Hyper-V
Virtual Machine Platform
WSL 2 Kernel
WSL 1 vs. WSL 2
Availability
Why You Would Choose WSL 1
Why You Would Choose WSL 2
The Future of WSL
GPU Compute
/dev/dxgkrnl
Direct3D 12
DirectML
OpenGL and OpenCL
Nvidia CUDA
Libraries
GUI Support
Chapter 2: Enabling WSL
In Programs and Features
Using PowerShell
Using DISM
Using wsl.exe --install
Installing a Distribution with wsl.exe âinstall
Using DISM to Enable WSL in Images
In Hyper-V Guests
Installing a Linux Distribution on WSL
Choice of Distribution
Consideration: WSL Version When Installing
Install from the Microsoft Store
Sideload an .appx File in Developer Mode
Import a Tarball Using wsl.exe --import
WSL Installation Mechanics
Installation Location
WSL Tooling
WSL API in Windows 10
Chapter 3: Managing WSL Distros
Listing All Distros
Listing Running Distros
Running a Default Distro
Setting a Default Distro
Running a Specific Distro
Running as a Specific User
Executing Single Commands
Shutdown
Terminate
Converting Distros Between WSL Versions
Export/Backup Distro
Import/Restore Distro
Duplicate Distros
Resetting Distros
Open WSL Distro âAppâ Settings
Advanced Options in WSL Distro âAppâ Settings
Considerations: Resetting WSL Distro
Uninstall Distros from the Microsoft Store
From the Windows Start Menu
From Advanced Options in WSL Distro âAppâ Settings
Using PowerShell
Uninstall Distros Installed Using wsl.exe --import
WSL 2 Kernel Management
Checking for Available Updates
Checking Kernel Update Status
Rolling Back Kernel Updates
Mounting External Volumes
Unmounting from Windows
Chapter 4: Linux Distro Maintenance
Packages
Dependencies
Completing Administrative Tasks with sudo
Update Packages
Upgrade Packages
Installing Packages
Uninstalling Packages
Abandoned Dependencies
Finding Packages
From the Terminal
Using a Terminal User Interface (TUI)
Using a Graphical User Interface (GUI)
Build Your Own Ubuntu WSL Image
Install an Image Bootstrapping Tool
Build Our Base Image
Customize Base Installation
Create rootfs tar
Import into WSL
Chapter 5: Configuring WSL Distros
Setting Per-Distro Settings
Automount Settings
Enabling
Root
File System Tab
Mount Options
Metadata
Case Sensitivity
Changing the UID and GID of a Mount
Background on Linux File Permissions
Symbolic Form
Checking a Fileâs Permissions
Numeric Form
File Mask
Changing umask and fmask of a Mount
Cross-Distro Mounting
ldconfig
Network
Generate Hosts File
Generate DNS File
Hostname
Interoperability
Enabling
Appending Windows Path
WSLENV
WSLENV Flags
Default User
Boot
Chapter 6: Configuring WSL 2
.wslconfig
Kernel
Kernel Command Line
Processors
Memory
Swap
Swap File
Page Reporting
Localhost Forwarding
Nested Virtualization
Debug Console
Tips
WSL Registry Settings
Chapter 7: Customizing WSL
Using Graphical Applications with X
Install an X Server on Windows
Configure WSL to Forward X to Your Windows X Server
WSL 2, GUI Apps, and Windows Firewall
Install a GUI Application
Debugging GUI Applications
dbus
Rolling Your Own init System
.bashrc
Windows Services
Windows Task Scheduler
Boot Command
Chapter 8: Going Further with WSL 2
Running systemd
A Simple Approach to systemd
Building Your Own Kernel for WSL 2
Installing a Guest Operating System on KVM on WSL
WSL 2 Advanced Networking
Chapter 9: Maximizing Windows Interoperability
wslpath
wslutilities
Redirecting Between Windows and Linux Applications
Piping
Piping Between Windows and WSL
Piping from WSL to Windows
Piping from Windows to WSL
File Redirection
Heredocs
Environmental Variables
Mount File Systems in WSL 2
Windows File Shares
SSHFS and Other FUSE-Based File Systems
Native Linux File Systems in a Disk Image or âPartitionâ
In a Partition
In a Disk Image (VHDX File)
Mounting Options
Chapter 10: Using WSL for Enterprise Development
Creating a Microk8s Workstation
Prerequisites for Microk8s
Installing Microk8s
Enabling Microk8s Add-Ons
Deploy a Cluster with Helm
Using Docker Desktop
Installing Docker Desktop on WSL
Building Docker Container
Connecting to Editors/IDEs
Visual Studio
Installing in Visual Studio Version 16.8 and Earlier
Installing in Visual Studio Version 16.9 and Later
Debugging Your App in WSL
Visual Studio Code
JetBrains IDEs
Utilizing GPU Compute Pass-Through
NVIDIA CUDA
DirectML for Non-NVIDIA GPUs
Chapter 11: Troubleshooting WSL
Installation
Ensure the Windows Optional Features Are Enabled
Check Your Security Application
Get the Latest Distro from the Windows Store
Virtualization
Linux Component Dependencies
systemd
dbus
Kernel Modules
Linux Applications
Using âstraceâ on WSL 1
Chapter 12: Deploying WSL at Scale
Considerations for Deploying
Using Intune to Deploy Ubuntu on WSL
Using Landscape to Manage Ubuntu on WSL
Enroll Ubuntu WSL into a Landscape Server
Executing a Script on the WSL Instance with Landscape
Managing Packages of the WSL Instance with Landscape
Using Ansible to Manage Ubuntu on WSL
Index
đ SIMILAR VOLUMES
<p><p>Become productive with seamless interoperability between Windows and the Linux subsystem, and understand the problems that Windows Subsystem for Linux (WSL) solves. Microsoft has pushed the boundaries of open source research with WSL and you don't want to miss this ride. </p><p>You will learn
<p><b>A practical handbook that will help you bridge the gap between Windows and Linux to develop apps that leverage the best features across both ecosystems with seamless interoperability</b></p><h4>Key Features</h4><ul><li>Configure and control WSL to suit your needs and preferences</li><li>Discov
<p><b>A practical handbook that will help you bridge the gap between Windows and Linux to develop apps that leverage the best features across both ecosystems with seamless interoperability</b></p><h4>Key Features</h4><ul><li>Configure and control WSL to suit your needs and preferences</li><li>Discov
Contains companion source files