1.\" $NetBSD: mount_9p.8,v 1.17 2022/02/11 14:10:12 uwe Exp $ 2.\" 3.\" Copyright (c) 2007 Antti Kantee. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd February 10, 2022 27.Dt MOUNT_9P 8 28.Os 29.Sh NAME 30.Nm mount_9p 31.Nd mount a file server using the 9P resource sharing protocol 32.Sh SYNOPSIS 33.Nm 34.Op Fl 46Csu 35.Op Fl o Ar options 36.Op Fl p Ar port 37.Oo Ar user Ns Li \&@ Oc Ns Ar host Ns Op Li \&: Ns Ar path 38.Ar mount_point 39.Nm 40.Fl c 41.Op Fl Csu 42.Op Fl o Ar options 43.Ar device 44.Ar mount_point 45.Sh DESCRIPTION 46The 47.Nm 48program is used to mount a file hierarchy served with the Plan 9 49resource sharing protocol 9P. 50After the file system is mounted, the files on the remote 51.Ar host 52will be accessed using the credentials of the user named 53.Ar user 54and whatever UID the user happens to have on the remote server. 55If 56.Ar path 57is supplied, it is used as the mount rootpath on the remote host. 58.Ar path 59must be an absolute path. 60.Pp 61The host name may be optionally enclosed in square brackets. 62This is required when using numeric IPv6 addresses as they contain 63colons as part of their syntax. 64.Pp 65The 66.Fl c 67option enables to mount a file system exported by a VM host through 68a character device file 69.Ar device 70backed by the 71.Xr vio9p 4 72driver. 73See 74.Xr vio9p 4 75for more information. 76.Pp 77The following options are available: 78.Bl -tag -width "Fl o Ar options" 79.It Fl 4 80Forces 81.Nm 82to use IPv4 addresses only. 83.It Fl 6 84Forces 85.Nm 86to use IPv6 addresses only. 87.It Fl C 88Permit the kernel to cache pathname components. 89By default every time the kernel does a lookup for a component name, 90the file server will be consulted. 91.It Fl c 92Interpret 93.Ar special 94as a device name. 95See 96.Xr vio9p 4 . 97.It Fl o Ar options 98Mount options. 99See documentation for the 100.Fl o 101option to 102.Xr mount 8 . 103.It Fl p Ar port 104Use the specified TCP port. 105By default 106.Nm 107uses port 564 108.Li ( 9pfs ) . 109Another useful port is 6666 110.Li ( styx ) , 111used by Inferno operating system. 112.It Fl s 113Run in the foreground. 114Useful for debugging. 115.It Fl u 116Use 9P2000.u protocol that includes extensions to better support Unix 117environments. 118.El 119.Sh SEE ALSO 120.Xr puffs 3 , 121.Xr puffs 4 , 122.Xr vio9p 4 , 123.Xr mount 8 124.Rs 125.%T 9P: The Simple Distributed File System from Bell Labs 126.%U http://9p.cat-v.org/ 127.Re 128.Rs 129.%T RFC and standards documents relating the 9P protocol 130.%U http://ericvh.github.io/9p-rfc/ 131.Re 132.Sh HISTORY 133The 134.Nm 135utility first appeared in 136.Nx 5.0 . 137.Pp 138Experimental 9P2000.u support appeared in 139.Nx 9.0 . 140.Pp 141The 142.Xr vio9p 4 143support appeared in 144.Nx 10.0 . 145.Sh CAVEATS 146Authentication is not supported. 147.Pp 148Permissions are not handled well. 149.Pp 150Error code handling is missing for 9P2000. 151.Pp 1529P2000.u support doesn't use extension fields. 153