9P is a network protocol developed for the Plan 9 from Bell Labsdistributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system. 9P was revised for the 4th edition of Plan 9 under the name 9P2000, containing various improvements. Some of the improvements made are, the removal of certain filename restrictions, the addition of a 'last modifier' metadata field for directories, and authentication files. The latest version of the Inferno operating system also uses 9P2000. The Infernofile protocol was originally called Styx, but technically it has always been a variant of 9P. A server implementation of 9P for Unix, called u9fs, is included in the Plan 9 distribution. A 9P OS X client kernel extension is provided by Mac9P. A kernel client driver implementing 9p with some extensions for Linux is part of the v9fs project. 9P and its derivatives have also found application in embedded environments, such as the Styx on a Brick project.
Server applications
Many of Plan 9's applications take the form of 9P file servers. Examples include:
Windows Subsystem for Linux: since Windows 10 version 1903, the subsystem implements 9P as a server and the host Windows operating system acts as a client.
Crostini: a custom 9P server is used to provide access to files outside of a Linux VM
QEMU: the VirtFS device allows for filesystem sharing over 9P, which is accelerated with kernel drivers and shared memory
: Distributed I/O Daemon - a 9P file server
Implementation
9P sends the following messages between clients and servers. These messages correspond to the entry points in the Plan 9 vfs layer that any 9P server must implement. ; version ; error ; flush ; auth, attach ; walk ; create, open ; read, write ; clunk ; remove ; stat, wstat