mount, umount - mount and unmount a Network File System (NFS)
/etc/mount [ -t nfs -f -r -v ] [ options ] device directory
/etc/umount [ -v ] directory
The command allows you to mount a file system or directory onto a
directory. Once a file system or directory has been mounted, it is
treated as a file system.
The argument device can have one of the following forms:
The remote_name is the name of a file system or subtree of a file sys‐
tem that has been exported by host. The file directory must exist and
must be a directory. It becomes the name of the newly mounted file
General users can mount file systems with certain restrictions in addi‐
tion to those listed in
The command unmounts the remote file system that was previously mounted
on the specified directory.
See the reference page for a description of the -t option.
-f Fast unmount. The -f option has no meaning for local file
systems and directories. However, for remote file system
types (such as NFS), the -f option causes the client to
unmount the remotely mounted file systems and directories
without notifying the server. This can avoid the delay of
waiting for acknowledgment from a server that is down.
-r Indicates that the file system is to be mounted read only.
-v Tells what did or did not happen. (Verbose flag)
-o options Specifies options as a sequence of words, separated by com‐
mas, from the list that follows. The default options are
Defaults for rsize and wsize are set by the kernel. The
NFS options are as follows:
bg If the first mount attempt fails, retry the
mount in the background the number of times
specified (the default is 10,000 times).
grpid All files or directories created in the file
system being mounted are created so that they
inherit their parent's ID regardless of the
setting of the bit in their parent's direc‐
tory. Note that in the absence of the
option, all files or directories created in
the file system inherit the group ID of the
hard Retry the NFS operation (not the mount)
request until server responds. The hard
option applies after the has succeeded. Use
the hard option when mounting (read-write)
intr Allow hard mounted file system operations to
nintr Disallow hard mounted file system operations
from being interrupted.
noexec Binaries cannot be executed from this file
nosuid The and programs can not be executed from
this file system.
pgthresh=## Set the paging threshold for this file system
port=n Set server IP port number to n.
retrans=n Set number of NFS operation retransmissions
(not the mount) to n. The retrans= option
applies after the has succeeded.
retry=n Set number of mount failure retries to n.
The retry= option applies to the command,
rsize=n Set read buffer size to n bytes.
soft Return an error if the server does not
respond to the NFS operation (not the mount)
request. The soft option applies after the
has succeeded. Do not use the soft option to
mount (read-write) file systems.
timeo=n Set NFS timeout to n tenths of a second.
wsize=n Set write buffer size to n bytes.
The following options affect how quickly you see updates to
a file or directory that has been modified by another host.
Increasing these values will give you slightly better per‐
formance. Decreasing these values decreases the time it
takes for you to see modifications made on another host.
If you are the only modifier of files under this mount
point, you can increase these values.
acdirmin=n Hold cached directory attributes for at least
n seconds. The default is 30 seconds.
acdirmax=n Hold cached directory attributes for no more
than n seconds. The default is 60 seconds.
The maximum value allowed is 3600.
acregmin=n Hold cached file attributes for at least n
seconds. The default is 3 seconds.
acregmax=n Hold cached file attributes for no more than
n seconds. The default is 60 seconds. The
maximum value allowed is 3600.
actimeo=n Set all four attributes cache timeout values
noac Do not set attribute caching. This is equiv‐
alent to actimeo=0.
The option causes to run in the background if the server's daemon does
not respond. The command attempts each request retry=n times before
giving up. Once the file system is mounted, each NFS request made in
the kernel waits timeo=n tenths of a second for a response. If no
response arrives, the time-out is multiplied by 2 and the request is
When retrans=n retransmissions have been sent with no reply, a soft
mounted file system returns an error on the request and a hard mounted
file system retries the request. If a hard mounted file system was
mounted with the option, an operation within that file system that is
retrying (for example, the server is down) can be interrupted. File
systems that are mounted (read-write) should use the hard option. The
number of bytes in a read or write request can be set with the and
options. The values for and must be between 512 and 8192, and be a mul‐
tiple of 512.
The option for is:
-v Tells what did or did not happen. (Verbose flag)
If the directory on which a file system is to be mounted is a symbolic
link, the file system is mounted on the directory to which the symbolic
link refers, rather than being mounted on top of the symbolic link
The and commands should only be invoked by the and commands. It is
recommended that users (and superusers) do not invoke the and commands.
An exception to this rule is the use of the -b command in the file. The
-b command broadcasts a message informing NFS servers that this machine
no longer has any NFS filesystems mounted. This is done in case the
machine had crashed while it had NFS filesystems mounted. The servers
use this information to clean up their tables. The command automati‐
cally adds the -b line to the file on NFS client systems.
The command invokes to do its work. A sample command is:
# mount-t nfs -o hard,pgthresh=100 server:/usr /usr
To mount the remote file system onto the local directory with 1k trans‐
fer size, type:
# mount-t nfs -o rsize=1024,wsize=1024 serv:/usr/src /mnt
To mount the remote directory onto the local directory type:
# mount-t nfs serv:/usr/src/code /usr/src
To hard mount a remote file system called onto the local directory
# mount-t nfs -o hard serv:/usr/src /usr/src
File system information file
NFS-specific mount program
NFS-specific unmount program
See Alsogetmnt(2), mount(2), fstab(5), exports(5nfs), mount(8), umount(8),
mountd(8nfs), rmtab(5nfs), nfssetup(8nfs)mount(8nfs)