mount command

Purpose

Makes a file system available for use.

Syntax

mount [ [ Node:Directory ] Directory ]

mount -cd DeviceDirectory

Description

The mount command instructs the operating system to make a file system available for use at a specified location (the mount point). The mount command mounts a file system expressed as a directory using the Node:Directory parameter on the directory specified by the Directory parameter. After the mount command has finished, the directory specified becomes the root directory of the newly mounted file system.

If you enter the mount command without flags, the command displays the following information for the mounted file systems:
  • the node (if the mount is remote)
  • the object mounted
  • the mount point
  • the virtual-file-system type
  • the time mounted
  • any mount options

The /mnt directory can be used as a local mount point, or you can create a directory using the mkdir command. Any directories created with the mkdir command must be a sub-directory of your home directory.

Flags

Flag name Description
-cd Specifies the cd device name on which to mount.

Examples

  1. To list the mounted file systems, type:
    mount
    This command produces output similar to the following:
    node   mounted          mounted    vfs  date          options   over
    ----   -------          ---------  ---  ------------   -------  ---------
           /dev/hd0         /          jfs  Dec 17 08:04   rw, log  =/dev/hd8
           /dev/hd3         /tmp       jfs  Dec 17 08:04   rw, log  =/dev/hd8
           /dev/hd1         /home      jfs  Dec 17 08:06   rw, log  =/dev/hd8
           /dev/hd2         /usr       jfs  Dec 17 08:06   rw, log  =/dev/hd8
    sue    /home/local/src  /usr/code  nfs  Dec 17 08:06   ro, log  =/dev/hd8
    For each file system, the mount command lists the node name, the device name, the name under which it is mounted, the virtual-file-system type, the date and time it was mounted, and its options.
  2. To mount the remote directory on to a local directory, enter:
    mount testsys3:/test /mnt
    This command mounts the /test directory located on testsys3 onto the local /mnt directory.



Last updated: Wed, November 18, 2020