Skip to content
Surf Wiki
Save to docs
technology/networking

From Surf Wiki (app.surf) — the open knowledge base

9P (protocol)

Network protocol for the Plan 9 distributed operating system


Network protocol for the Plan 9 distributed operating system

FieldValue
title9P
is stackNo
purposeConnecting components
developerBell Labs
date
influenced9P2000

9P (or the Plan 9 Filesystem Protocol or Styx) is a network protocol developed for the Plan 9 from Bell Labs distributed 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 Inferno file 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 for Lego Mindstorms Bricks.

Server applications

Many of Plan 9's applications take the form of 9P file servers. Examples include:

  • acme: a text editor/development environment
  • rio: the Plan 9 windowing system
  • plumber: interprocess communication
  • ftpfs: an FTP client that presents the files and directories on a remote FTP server in the local namespace
  • wikifs: a wiki editing tool that presents a remote wiki as files in the local namespace
  • webfs: a file server that retrieves data from URLs and presents the contents and details of responses as files in the local namespace

Outside of Plan 9, the 9P protocol is still used when a lightweight remote file system is required:

  • NixOS: a Linux distribution that uses the Nix package manager. NixOS can rebuild itself inside a virtual machine, where the client uses 9P to mount the package store directory of the host.
  • GNU Guix: a package manager that can instantiate and manage Unix-like operating systems. It can instantiate a system inside a virtual machine in the same manner that NixOS does
  • Windows Subsystem for Linux (WSL): 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
  • DIOD: Distributed I/O Daemona 9P file server
  • ZeroFS: A 9P server with object storage backend.

References

References

  1. "Plan 9 from Bell Labs — Overview".
  2. "research: u9fs.tgz is the source code tarbal".
  3. "Plan 9 /sys/man/4/u9fs".
  4. benavento. (April 19, 2019). "9P for Mac".
  5. "Styx-on-a-Brick".
  6. (February 16, 2019). "What's new for WSL in Windows 10 version 1903?".
  7. "Running Custom Containers Under Chrome OS". Chromium OS Docs.
  8. (July 13–16, 2010). "VirtFS—A virtualization aware File System pass-through". Linux Symposium.
  9. "Documentation/9psetup".
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about 9P (protocol) — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report