Mount a block special device or remote filesystem
mount [-wruv] [-t type [-o options] [special] mountpoint] mount [-wruv] [-T type [-o options] special [mountpoint]] mount [-wruv] -e [-t|T type] [-o options] special [mountpoint] mount
- Prevent the lookup of the fstab file.
- Enumerate the children of the special device.
- -o options
- Options specific to the server doing the mounting.
These options include:
- before -- Mount the filesystem so that it's resolved before any other filesystems mounted at the same pathname (in other words, it's placed in front of any existing mount). When you access a file, the system looks on this filesystem first.
- after -- Mount the filesystem so that it's resolved after any other filesystems mounted at the same pathname (in other words, it's placed behind any existing mount). When you access a file, the system looks on this filesystem last, and only if the file wasn't found on any other filesystems.
For more information, see "Ordering mountpoints" in the Process Manager chapter of the System Architecture guide.
- Mount the device as read-only.
- -T type ... special [mountpoint]
- The special device is a string that may specify a real device or may be just a hint for the server. If mountpoint isn't specified, the server will automatically create an appropriate mountpoint.
- -t type ... [special] mountpoint
- If the optional special string is given, the mount request goes to the server which created, or is responsible for, the special device. If this special device does not exist, the server interprets the string as a hint. If special is not given, it is passed as NULL.
- Mount for update (remount).
- Increase the verbosity.
- Mount the device as read/write.
- Where the device is to be mounted on your system.
- The name of the special device.
- The type of filesystem or manager to mount:
type: Filesystem or manager: cd fs-cd.so cifs fs-cifs dos fs-dos.so ext2 fs-ext2.so io-audio io-audio io-net io-net io-usb io-usb nfs fs-nfs2, fs-nfs3 qnx4 fs-qnx4.so
The default is qnx4.
Without options, mount displays the current mount points. With options set, this utility mounts the block special device or remote filesystem, special, as the specified mountpoint. To mount a real special device, use the -t option; to specify a special-device string (which isn't necessarily a real device), use -T.
|Some servers may not support all the mount options, especially with respect to remounting and enumerating.|
The mount utility supports the /etc/fstab file.
Mount a QNX 4 filesystem on a hard drive as /mnt/fs:
mount -t qnx4 /dev/hd0t77 /mnt/fs
Mount a device driver for io-net. In this example, devn-ne2000.so is the name of the shared object that io-net needs to load for the driver, not the name of a real device:
mount -T io-net devn-ne2000.so
Enumerate the hard disk partition table:
mount -e /dev/hd0
This will re-read the disk partition table for /dev/hd0, and create, update or delete /dev/hd0tXX block-special files for each partition. This is used in the following two scenarios:
- when the disk driver is used without any automatic enumeration ("blk auto=none"), or
- when the partition table has been modified (for example, with "fdisk").
Mount a CIFS filesystem (fs-cifs must be running first):
mount -T cifs -o abc,efg //node123:184.108.40.206:/C /ctest
Where your name is abc, your password is efg, your CIFS server is node123 with an IP address of 220.127.116.11, the share you want to mount is /C, and the mountpoint you want to use is /ctest.
Mount an NFS 2 client filesystem (fs-nfs2 must be running first):
mount -T nfs 10.1.0.22:/home /mnt/home
Mount an NFS 3 client filesystem (fs-nfs3 must be running first):
mount -T nfs -o ver3 server_node:/qnx_bin /bin
Mount the Qnet network protocol:
mount -T io-net /lib/dll/npm-qnet.so
Display current mount points:
Mount the shared object that supports Enhanced Host Controller Interface (EHCI) USB controllers:
mount -T io-usb devu-ehci.so /dev/io-usb/io-usb