BIND(1) BIND(1)
NAME
bind, mount, unmount - change name space
SYNOPSIS
bind [ option ... ] source target
mount [ option ... ] addr target [ spec ]
unmount [ source ] target
DESCRIPTION
The bind and mount commands modify the file name space of
the current process and other processes in the same name
space group (see sys-pctl(2)). For both calls, target is the
name of an existing file or directory in the current name
space where the modification is to be made.
For bind, source is the name of an existing file or direc-
tory in the current name space. After a successful bind,
the file name target is an alias for the object originally
named by source ; if the modification doesn't hide it,
source will also still refer to its original file. The
evaluation of source (see sys-intro(2)) happens at the time
of the bind, not when the binding is later used.
Both source and target files must be of the same type:
either both directories or both files.
For mount, addr is usually a network address for a machine
acting as a file server. This argument should then conform
to the conventions described in sys-dial(2). It can also be
the name of a file that when opened gives a connection to a
file server. The optional spec argument to mount is passed
in the attach(5) message and selects amongst different file
trees offered by the server.
The effects of bind and mount can be undone by unmount. If
two arguments are given to unmount, the effect is to undo a
bind or mount with the same arguments. If only one argument
is given, everything bound to or mounted on target is
unmounted.
OPTIONS
Options control aspects of the modification to the name
space:
-r The default option for both bind and mount.
Replace the target file by the new one source.
Henceforth, an evaluation of the pathname target
will be translated to the new file. If they are
Page 1 Plan 9 (printed 10/29/25)
BIND(1) BIND(1)
directories (for mount, this condition is true by
definition), target becomes a union directory con-
sisting of one directory (the source directory).
-b Both files must be directories. Add the source
directory to the beginning of the union directory
represented by the target directory.
-a Both files must be directories. Add the source
directory to the end of the union directory repre-
sented by the target directory.
-c This can be used in addition to any of the above
to permit creation in a union directory. When a
new file is created in a union directory, it is
placed in the first element of the union that per-
mits creation.
-A For mount only. Do not authenticate the connection
to the server before proceeding with mount. Other-
wise the connection is authenticated by security-
auth(2).
-C alg For mount only, specify the algorithm, alg, to be
used following authentication for digesting or
encryption. See ssl(3) for the supported algo-
rithms. The default is none: ssl(3) is not used
after authentication.
-f kfile For mount only, specify the keyfile to be used
when authenticating. The default is
/usr/user/keyring/default. See keyring-auth(2)
for more details.
A union directory unites the contents of the source and tar-
get directories. If the same name appears in both directo-
ries, the name used is the one in the directory that is
bound before the other. In particular, if the directories
have subdirectories of the same name, only the contents of
the subdirectory in the top directory will be seen. If the
subdirectory contents are themselves to be united, that must
be done first in a separate bind or mount.
CAVEAT
The # character in the name of a kernel device must be
quoted when used in a bind or unmount command, or the shell
will take it as the start of a comment.
SOURCE
/appl/cmd/bind.b
/appl/cmd/mount.b
/appl/cmd/unmount.b
Page 2 Plan 9 (printed 10/29/25)
BIND(1) BIND(1)
SEE ALSO
sh(1), keyring-auth(2), security-auth(2), sys-intro(2),
sys-bind(2), sys-dial(2), intro(3), getauthinfo(8)
Page 3 Plan 9 (printed 10/29/25)