9P(1)
π NAME π
okay bestie, welcome to 9P(1) from the General Commands Manual π
β this page is all about 9p β read and write files on a 9P server. π¦
β¨ SYNOPSIS β¨
9p [ options ] read path
9p [ options ] readfd path
9p [ options ] write [ -l ] path
9p [ options ] writefd path
9p [ options ] stat path
9p [ options ] rdwr path
9p [ options ] ls [ -dl ] path...
πΈ DESCRIPTION πΈ
9p is a trivial 9P client that can access a single file on a 9P server. It can be useful for manual interaction with a 9P server or for accessing simple 9P services from within shell scripts. The common options are:
-aaddr β dial the server at addr-Aaname β attach to the file system named aname-nβ mount without authentication
The first argument is a command, one of:
readβ print the contents of path to standard outputwriteβ write data on standard input to path; the-loption causeswriteto write one line at a timereadfd,writefdβ likereadandwritebut useopenfd(9p)instead ofopen; this masks errors and is mainly useful for debugging the implementation ofopenfdstatβ executestat (9p)on path and print the resultrdwrβ Open path for reading and writing. Then repeat until end-of-file on standard input: copy a line from the file to standard output, copy a line from standard input to the file. Print errors, but don't give up.Rdwris useful for interacting with servers likefactotum(4).lsβ Print a directory listing in the format ofls(1). The-dand-lflags have the same meaning as inls.
9p dials address to connect to the 9P server. If the -a option is not given, 9p requires the path to be of the form service/subpath; it connects to the Unix domain socket service in the name space directory (see intro(4)) and then accesses subpath.
π₯ EXAMPLE π₯
To update plumber(4)'s copy of your plumbing rules after editing $HOME/lib/plumbing:
cat $HOME/lib/plumbing | 9p write plumb/rules
To display the contents of the current acme(4) window:
9p read acme/$winid/body
π«Ά SOURCE π«Ά
/src/cmd/9p.c
π SEE ALSO π
intro(4), intro(9p), 9pclient(3)
and thatβs the whole 9P(1) manual page, bestie π β the footer just says 9P(1), no extra date or version line, so thatβs the sign-off vibe, periodt π
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms