wslhost.exe is the Windows-side manager that keeps WSL2 running - the "heartbeat" of the system.
lswhost - Linux daemon that manages Windows PE processes
wslhost.exe- Host manager processwsl.exe- User CLI tool- VM management components
- Filesystem bridge
- Linux kernel (custom patches)
- Init system integration
- 9P filesystem protocol for Windows access
- lswhost daemon - Manages Windows processes
- lsw CLI tool - User interface
- PE binary loader
- Filesystem bridge (/mnt/c mapping)
- Windows PE binaries
- Syscall translation layer
- Registry access
- Windows API emulation
| WSL2 Component | LSW Equivalent | Function |
|---|---|---|
| wslhost.exe | lswhost daemon | Process lifecycle management |
| wsl.exe | lsw CLI | User command interface |
| VM manager | Kernel module | Process isolation/management |
| 9P filesystem | FUSE/overlay | Filesystem bridge |
| Windows host | Linux host | Base operating system |
| Linux kernel | Windows ABI layer | Target execution environment |
- WSL Source: https://github.com/barrersoftware/WSL-research
- WSL2 Kernel: https://github.com/barrersoftware/WSL2-Kernel-Research
-
Analyze wslhost.exe behavior
- Process spawning
- Lifecycle management
- Inter-process communication
- Resource management
-
Design lswhost daemon
- Reverse wslhost functionality
- PE binary execution
- Windows process supervision
- Resource allocation
-
Study filesystem bridge
- How WSL2 maps Windows → Linux
- Reverse for Linux → Windows (/mnt/c)
- File handle translation
- Permission mapping
-
Syscall translation
- Windows syscall interface
- Linux kernel mapping
- Performance optimization
- WSL2 uses lightweight VM for Linux kernel
- LSW uses kernel module for Windows ABI
- Both achieve near-native performance
- Architecture is proven by Microsoft
- We have source code to study!
Research ongoing. This document tracks our analysis of WSL2 to build LSW.
🏴☠️ BarrerSoftware - LSW Project