Fun fact: there’s Plan 9 in Windows and QEMU

If you’re only even remotely aware of the operating system Plan 9, you’ll most likely know that it takes the UNIX concept of “everything is a file” to the absolute extreme. In order to make sure all these files – and thus the components of Plan 9 – can properly communicate with one another, there’s 9P, or the Plan 9 Filesystem Protocol. Several Plan 9 applications are 9P file servers, for instance, and even things like windows are files. It’s a lot more complicated than this, of course, but that’s not relevant right now.

Since Plan 9 wasn’t exactly a smashing success that took the operating system world by storm, you might not be aware that 9P is actually implemented in a few odd places. My favourite is how Microsoft turned to 9P for a crucial feature of its Windows Subsystem for Linux: accessing files inside a Linux VM running on Windows.

To put it briefly: a 9P protocol file server facilitates file related requests, with Windows acting as the client.

We’ve modified the WSL init daemon to initiate a 9P server. This server contains protocols that support Linux metadata, including permissions. A Windows service and driver that act as the client and talks to the 9P server (which is running inside of a WSL instance). Client and server communicate over AF_UNIX sockets, since WSL allows interop between a Windows application and a Linux application using AF_UNIX as described in this post.

↫ Craig Loewen at Microsoft’s Dev Blogs

This implementation is still around today, so if you’re using Windows Subsystem for Linux, you’re using a little bit of Plan 9 as glue to make it all come together. Similarly, if you’re using QEMU and sharing files between the host and a VM through the VirtFS driver, you’re also using 9P. Both NixOS and GNU Guix use 9P when they build themselves inside a virtual machine, too, and there’s probably a few other places where you can run into 9P.

I don’t know, I thought this was interesting.

2 Comments

  1. 2026-01-15 6:59 pm
  2. 2026-01-15 8:41 pm

Leave a Reply