Home

9P

9P, also known as the 9P protocol or Plan 9 File Protocol, is a network protocol developed for the Plan 9 from Bell Labs operating system family. It provides a uniform interface for accessing resources—files, devices, and services—across a network as if they were part of a single hierarchical file system. This abstraction enables remote resources to be mounted and accessed with simple read/write semantics.

Interaction is message-based. A client issues a sequence of requests carrying a file identifier (fid) that references

Originally defined as 9P2000 in Plan 9, the protocol has been implemented in several variants and extensions

9P is notable for its simplicity and compact wire format, which lower the barrier to implementing servers

an
open
object,
and
the
server
replies
with
the
data
and
status.
Core
operations
include
attach
to
connect
a
client
to
a
namespace,
walk
to
traverse
path
components,
open
and
create
to
obtain
an
opened
file,
read
and
write,
stat
to
get
metadata,
clunk
to
release
a
fid,
and
walk
results.
FIDs
and
QIDs
(unique
identifiers
for
objects)
are
used
to
maintain
context
across
messages.
9P
supports
mounting
a
server's
namespace
at
a
point
in
a
client’s
namespace,
enabling
flexible
resource
sharing.
to
support
different
environments
and
security
requirements.
The
transport
typically
uses
TCP
but
can
run
over
other
channels.
Implementations
exist
on
Plan
9,
Inferno,
and
ported
to
various
Unix-like
systems
and
embedded
environments.
in
diverse
environments
and
for
enabling
transparent
networking
of
resources.
It
has
influenced
other
distributed
file
system
designs
and
remains
a
reference
in
discussions
of
network
file
systems.