mirror of
https://github.com/microsoft/WSL.git
synced 2025-07-04 15:49:35 +00:00

Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016. The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021: Number of commits on the main branch: 2930 Number of contributors: 31 Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.
46 lines
No EOL
2 KiB
Markdown
46 lines
No EOL
2 KiB
Markdown
# WSL Overview
|
|
|
|
WSL is comprised of a set of executables, API's and protocols. This page offers an overview of the different components, and how they're connected.
|
|
Click on any component to get more details.
|
|
|
|
|
|
```mermaid
|
|
%%{ init: {
|
|
'flowchart': { 'curve': 'stepBefore' },
|
|
'theme': 'neutral'
|
|
}
|
|
}%%
|
|
graph
|
|
subgraph Windows["<b><p style="font-size:30px">Windows</p></b>"]
|
|
C:\Windows\System32\wsl.exe["C:\Windows\System32\wsl.exe"]---|"CreateProcess()"|wsl.exe;
|
|
wsl.exe[<a href="wsl.exe">wsl.exe</a>]---|COM|wslservice.exe;
|
|
wslg.exe[<a href="wslg.exe">wslg.exe</a>]---|COM|wslservice.exe;
|
|
wslconfig.exe[<a href="wslconfig.exe">wslconfig.exe</a>]---|COM|wslservice.exe;
|
|
wslapi.dll[<a href="https://learn.microsoft.com/windows/win32/api/wslapi/">wslapi.dll</a>]---|COM|wslservice.exe;
|
|
id[debian.exe, ubuntu.exe, ]---|"LoadLibrary()"|wslapi.dll;
|
|
wslservice.exe[<a href="wslservice.exe">wslservice.exe</a>]---|"CreateProcessAsUser()"|wslrelay.exe[<a href="wslrelay.exe">wslrelay.exe</a>];
|
|
wslservice.exe---|"CreateProcessAsUser()"|wslhost.exe[<a href="wslhost.exe">wslhost.exe</a>];
|
|
fs["Windows filesystem (//wsl.localhost)"]
|
|
end
|
|
|
|
wslservice.exe -----|hvsocket| mini_init
|
|
wslservice.exe -----|hvsocket| gns
|
|
fs---|hvsocket|plan9
|
|
|
|
wsl.exe---|hvsocket|relay
|
|
|
|
subgraph Linux["<b><p style="font-size:30px">Linux</p></b>"]
|
|
mini_init[<a href="mini_init">mini_init</a>]---|"exec()"|gns[<a href="gns">gns</a>]
|
|
mini_init---|"exec()"|init[<a href="init">init</a>];
|
|
mini_init---|"exec()"|localhost[<a href="localhost">localhost</a>];
|
|
|
|
subgraph "Linux Distribution"["<b><p style="font-size:23px">Linux Distribution</p></b>"]
|
|
|
|
init[<a href="init">init</a>]---|"exec()"|plan9[<a href="plan9">plan9</a>];
|
|
init---|"exec()"|sid[session leader];
|
|
sid[<a href="session-leader">session leader</a>]---|"exec()"|relay
|
|
relay[<a href="relay">relay</a>]---|"exec()"|cid["User command (bash, curl)"]
|
|
end
|
|
|
|
end
|
|
``` |