.Dd $Mdocdate: October 07 2025 $.Dt 9PFS 1.Os.Sh NAME.Nm 9pfs.Nd mount 9P service via FUSE.Sh SYNOPSIS.Nm 9pfs.Bk -words.Op Fl dUVTaf.Op Fl A Ar aname.Op Fl p Ar port.Op Fl u Ar user.Op Fl o Ar fuse_options.Ar service.Ar mountpoint.Ek.Sh DESCRIPTION.Nm 9pfsmounts the 9P service running at.Ar serviceonto.Ar mountpointusing the FUSE user-level file system driver..PpThe following options are available:.Bl -tag -width Ds.It Fl dCauses debug information for subsequent FUSE library calls to beoutput to stderr and logged to /tmp/9pfs-(pid).log. Implies \fB-f\fP..It Fl UThe 9P service is a UNIX-domain socket..It Fl VConnect to the 9P service through a vsock, using.Ar serviceas vsock CID. The port is specified using \fB-p\fP..It Fl TCommunication to the 9P service willbe done through a dp9ik tls tunnel through\fBtlsclient\fP(1)..It Fl aNegotiate authentication using a local factotum. See.Sx ENVIRONMENTand.Sx EXAMPLESfor more details..It Fl fIndicates that \fB9pfs\fP should not detach from thecontrolling terminal and run in the foreground..It Fl A Ar anameThe attach name to send to the 9P service..It Fl p Ar portSpecifies the connection port for the 9P service. The defaultis 564..It Fl u Ar userSpecifies the username to use on authenticationand attach to the 9P service..It Fl o Ar optionsPasses additional options to fuse_mount(3)..El.Pp9pfs caches directories it reads which will causeinconsistencies if a different 9P client is connectedto and making changes to the same 9P service. Thereis a virtual control file.Ql .fscachein each directory served by 9pfs.Reading or writing anything to that file will clearthe cache for that directory..Sh ENVIRONMENT.Bl -tag -width FACTOTUM.It Ev FACTOTUMAuthentication requires that the 9P serviceprovided by a factotum.Po see.Lk http://man.cat-v.org/9front/4/factotum.Pcis mounted at the path specified by the.Ev FACTOTUMenvironment variable. Plan 9 from User Space.Po.Lk https://swtch.com/plan9port/.Pcprovides a port of factotum toUNIX-like operating systems.See the.Sx EXAMPLESsection below for details..El.Sh EXAMPLESThe following will mount a remote 9P servicewith authentication, as long as plan9port isinstalled..Pp.Dl $ factotum -n.Dl $ 9pfs -U `namespace`/factotum mnt/factotum.Dl $ export FACTOTUM=`pwd`/mnt/factotum.Dl $ 9pfs -a spew.net mnt/spew.Dl !adding key: role=client proto=p9sk1 dom=spew.Dl user[glenda]:.Dl password:.Dl !.PpThe dom for authentication will needto have an IP address assigned via /etc/hosts or yourplan9port $PLAN9/ndb/local file. The utilities.Ar factotumand.Ar namespaceare from Russ Cox's.Lk https://swtch.com/plan9port plan9port.Sh BUGSMoving a file to a different directory is not implemented.To do so, copy the file and then remove it..PpYou cannot access or create a file on the 9P servernamed.Ql .fscachein any directory..PpOpenBSD does not display all the files in a very largedirectory..Sh "SEE ALSO".Lk https://git.sr.ht/~moody/tlsclient tlsclient(1)
.Dd $Mdocdate: October 07 2025 $
.Dt 9PFS 1
.Os
.Sh NAME
.Nm 9pfs
.Nd mount 9P service via FUSE
.Sh SYNOPSIS
.Nm 9pfs
.Bk -words
.Op Fl dUVTaf
.Op Fl A Ar aname
.Op Fl p Ar port
.Op Fl u Ar user
.Op Fl o Ar fuse_options
.Ar service
.Ar mountpoint
.Ek
.Sh DESCRIPTION
.Nm 9pfs
mounts the 9P service running at
.Ar service
onto
.Ar mountpoint
using the FUSE user-level file system driver.
.Pp
The following options are available:
.Bl -tag -width Ds
.It Fl d
Causes debug information for subsequent FUSE library calls to be
output to stderr and logged to /tmp/9pfs-(pid).log. Implies \fB-f\fP.
.It Fl U
The 9P service is a UNIX-domain socket.
.It Fl V
Connect to the 9P service through a vsock, using
.Ar service
as vsock CID. The port is specified using \fB-p\fP.
.It Fl T
Communication to the 9P service will
be done through a dp9ik tls tunnel through
\fBtlsclient\fP(1).
.It Fl a
Negotiate authentication using a local factotum. See
.Sx ENVIRONMENT
and
.Sx EXAMPLES
for more details.
.It Fl f
Indicates that \fB9pfs\fP should not detach from the
controlling terminal and run in the foreground.
.It Fl A Ar aname
The attach name to send to the 9P service.
.It Fl p Ar port
Specifies the connection port for the 9P service. The default
is 564.
.It Fl u Ar user
Specifies the username to use on authentication
and attach to the 9P service.
.It Fl o Ar options
Passes additional options to fuse_mount(3).
.El
.Pp
9pfs caches directories it reads which will cause
inconsistencies if a different 9P client is connected
to and making changes to the same 9P service. There
is a virtual control file
.Ql .fscache
in each directory served by 9pfs.
Reading or writing anything to that file will clear
the cache for that directory.
.Sh ENVIRONMENT
.Bl -tag -width FACTOTUM
.It Ev FACTOTUM
Authentication requires that the 9P service
provided by a factotum
.Po see
.Lk http://man.cat-v.org/9front/4/factotum
.Pc
is mounted at the path specified by the
.Ev FACTOTUM
environment variable. Plan 9 from User Space
.Po
.Lk https://swtch.com/plan9port/
.Pc
provides a port of factotum to
UNIX-like operating systems.
See the
.Sx EXAMPLES
section below for details.
.El
.Sh EXAMPLES
The following will mount a remote 9P service
with authentication, as long as plan9port is
installed.
.Pp
.Dl $ factotum -n
.Dl $ 9pfs -U `namespace`/factotum mnt/factotum
.Dl $ export FACTOTUM=`pwd`/mnt/factotum
.Dl $ 9pfs -a spew.net mnt/spew
.Dl !adding key: role=client proto=p9sk1 dom=spew
.Dl user[glenda]:
.Dl password:
.Dl !
.Pp
The dom for authentication will need
to have an IP address assigned via /etc/hosts or your
plan9port $PLAN9/ndb/local file. The utilities
.Ar factotum
and
.Ar namespace
are from Russ Cox's
.Lk https://swtch.com/plan9port plan9port
.Sh BUGS
Moving a file to a different directory is not implemented.
To do so, copy the file and then remove it.
.Pp
You cannot access or create a file on the 9P server
named
.Ql .fscache
in any directory.
.Pp
OpenBSD does not display all the files in a very large
directory.
.Sh "SEE ALSO"
.Lk https://git.sr.ht/~moody/tlsclient tlsclient(1)