All pastes #213709 Raw Edit

Miscellany

public text v1 · immutable
#213709 ·published 2006-10-21 16:03 UTC
rendered paste body
mount
    mount [flags] DEVICE NODE [-o options,more-options] 

    Mount a filesystem. Filesystem autodetection requires /proc be mounted.

    Flags:

            -a:             Mount all filesystems in fstab
            USAGE_MTAB(     -f:             "Fake" Add entry to mount table but don't mount it
            -n:             Don't write a mount table entry
            )       -o option:      One of many filesystem options, listed below
            -r:             Mount the filesystem read-only
            -t fs-type:     Specify the filesystem type
            -w:             Mount for reading and writing (default)

    Options for use with the ``-o'' flag:

            async/sync:     Writes are asynchronous / synchronous
            atime/noatime:  Enable / disable updates to inode access times
            dev/nodev:      Allow use of special device files / disallow them
            exec/noexec:    Allow use of executable files / disallow them
            USAGE_MOUNT_LOOP(       loop:            Ignored (loop devices are autodetected)
            )       suid/nosuid:    Allow set-user-id-root programs / disallow them
            remount:        Re-mount a mounted filesystem, changing its flags
            ro/rw:          Mount for read-only / read-write
            bind:           Bind a directory to an additional location
            move:           Relocate an existing mount point.

    There are EVEN MORE flags that are specific to each filesystem You'll have to see the written documentation for those filesystems

    Returns 0 for success, number of failed mounts for -a, or errno for one mount.

    Example:

            $ mount
            /dev/hda3 on / type minix (rw)
            proc on /proc type proc (rw)
            devpts on /dev/pts type devpts (rw)
            $ mount /dev/fd0 /mnt -t msdos -o ro
            $ mount /tmp/diskimage /opt -t ext2 -o loop
            $ mount cd_image.iso mydir