Home Explore Blog CI



man-pages

16th chunk of `mount.man`
8e74b49b741ca9d37d413714e3e5d74ddb85b1dbbe32b72f0000000100000fa9
  semantic. This means the mount command reads fstab or mtab and
           merges these options with the options from the command line.

       ro
           Mount the filesystem read-only.

       rw
           Mount the filesystem read-write.

       sync
           All I/O to the filesystem should be done synchronously. In the case
           of media with a limited number of write cycles (e.g. some flash
           drives), sync may cause life-cycle shortening.

       user
           Allow an ordinary user to mount the filesystem. The name of the
           mounting user is written to the mtab file (or to the private
           libmount file in /run/mount on systems without a regular mtab) so
           that this same user can unmount the filesystem again. This option
           implies the options noexec, nosuid, and nodev (unless overridden by
           subsequent options, as in the option line user,exec,dev,suid).

       nouser
           Forbid an ordinary user to mount the filesystem. This is the
           default; it does not imply any other options.

       users
           Allow any user to mount and to unmount the filesystem, even when
           some other ordinary user mounted it. This option implies the options
           noexec, nosuid, and nodev (unless overridden by subsequent options,
           as in the option line users,exec,dev,suid).

       X-*
           All options prefixed with "X-" are interpreted as comments or as
           userspace application-specific options. These options are not stored
           in user space (e.g., mtab file), nor sent to the mount.type helpers
           nor to the mount(2) system call. The suggested format is
           X-appname.option.

       x-*
           The same as X-* options, but stored permanently in user space. This
           means the options are also available for umount(8) or other
           operations. Note that maintaining mount options in user space is
           tricky, because it’s necessary use libmount-based tools and there is
           no guarantee that the options will be always available (for example
           after a move mount operation or in unshared namespace).

           Note that before util-linux v2.30 the x-* options have not been
           maintained by libmount and stored in user space (functionality was
           the same as for X-* now), but due to the growing number of use-cases
           (in initrd, systemd etc.) the functionality has been extended to
           keep existing fstab configurations usable without a change.

       X-mount.auto-fstypes=list
           Specifies allowed or forbidden filesystem types for automatic
           filesystem detection.

           The list is a comma-separated list of the filesystem names. The
           automatic filesystem detection is triggered by the "auto" filesystem
           type or when the filesystem type is not specified.

           Thy list follows how mount evaluates type patterns (see -t for more
           details). Only specified filesystem types are allowed, or all
           specified types are forbidden if the list is prefixed by "no".

           For example, X-mount.auto-fstypes="ext4,btrfs" accepts only ext4 and
           btrfs, and X-mount.auto-fstypes="novfat,xfs" accepts all filesystems
           except vfat and xfs.

           Note that comma is used as a separator between mount options, it
           means that auto-fstypes values have to be properly quoted, don’t
           forget that the shell strips off quotes and thus double quoting is
           required. For example:

          mount -t auto -o’X-mount.auto-fstypes="noext2,ext3"'  /dev/sdc1
          /mnt/test

       X-mount.mkdir[=mode]
           Allow to make a target directory (mountpoint) if it does not exist
           yet. The optional argument mode specifies the filesystem access mode
           used for mkdir(2) in octal notation. The default mode is 0755. This
           functionality

Title: Filesystem-Independent Mount Options (cont.)
Summary
This section continues detailing filesystem-independent mount options for the `mount` command, specifically covering `nouser`, `users`, `X-*`, `x-*`, `X-mount.auto-fstypes`, and `X-mount.mkdir`. These options control user mount/unmount permissions, define comment and user-space application-specific options, specify allowed/forbidden filesystem types for auto-detection, and automatically create mountpoint directories with optional mode settings.