⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mount.8

📁 Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分区和管理硬盘驱动器
💻 8
📖 第 1 页 / 共 4 页
字号:
(This can be meaningful with the.B \-aoption.)For example, the command:.RS.RS.B "mount \-a \-t nomsdos,ext".REmounts all file systems except those of type.I msdosand.IR ext ..RE.TP.B \-OUsed in conjunction with.BR \-a ,to limit the set of filesystems to which the.B \-ais applied.  Like.B \-tin this regard except that it is useless except in the context of.BR \-a .For example, the command:.RS.RS.B "mount \-a \-O no_netdev".REmounts all file systems except those which have the option.I _netdevspecified in the options field in the.I /etc/fstabfile.It is different from.B \-tin that each option is matched exactly; a leading.B noat the beginning of one option does not negate the rest.The.B \-tand.B \-Ooptions are cumulative in effect; that is, the command.RS.B "mount \-a \-t ext2 \-O _netdev".REmounts all ext2 filesystems with the _netdev option, not all filesystemsthat are either ext2 or have the _netdev option specified..RE.TP.B \-oOptions are specified with a.B \-oflag followed by a comma separated string of options.Some of these options are only useful when they appear in the.I /etc/fstabfile.  The following options apply to any file system that is beingmounted (but not every file system actually honors them - e.g., the.B syncoption today has effect only for ext2, ext3 and ufs):.RS.TP.B asyncAll I/O to the file system should be done asynchronously..TP.B atimeUpdate inode access time for each access. This is the default..TP.B autoCan be mounted with the.B \-aoption..TP.B defaultsUse default options:.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async..TP.B devInterpret character or block special devices on the file system..TP.B execPermit execution of binaries..TP.B groupAllow an ordinary (i.e., non-root) user to mount the file system if oneof his groups matches the group of the device.This option implies the options.BR nosuid " and " nodev(unless overridden by subsequent options, as in the option line.BR group,dev,suid )..TP.B _netdevThe filesystem resides on a device that requires network access(used to prevent the system from attempting to mount these filesystemsuntil the network has been enabled on the system)..TP.B noatimeDo not update inode access times on this file system (e.g, for fasteraccess on the news spool to speed up news servers)..TP.B noautoCan only be mounted explicitly (i.e., the.B \-aoption will not cause the file system to be mounted)..TP.B nodevDo not interpret character or block special devices on the filesystem..TP.B noexecDo not allow direct execution of any binaries on the mounted file system.(Until recently it was possible to run binaries anyway using a command like/lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.).TP.B nosuidDo not allow set-user-identifier or set-group-identifier bits to takeeffect. (This seems safe, but is in fact rather unsafe if you havesuidperl(1) installed.).TP.B nouserForbid an ordinary (i.e., non-root) user to mount the file system.This is the default..TP.B ownerAllow an ordinary (i.e., non-root) user to mount the file system if heis the owner of the device.This option implies the options.BR nosuid " and " nodev(unless overridden by subsequent options, as in the option line.BR owner,dev,suid )..TP.B remountAttempt to remount an already-mounted file system.  This is commonlyused to change the mount flags for a file system, especially to make areadonly file system writeable. It does not change device or mount point..TP.B roMount the file system read-only..TP.B rwMount the file system read-write..TP.B suidAllow set-user-identifier or set-group-identifier bits to takeeffect..TP.B syncAll I/O to the file system should be done synchronously..TP.B dirsyncAll directory updates within the file system should be done synchronously.This affects the following system calls: creat, link, unlink, symlink,mkdir, rmdir, mknod and rename..TP.B userAllow an ordinary user to mount the file system.The name of the mounting user is written to mtab so that he can unmountthe file system again.This option implies the options.BR noexec ", " nosuid ", and " nodev(unless overridden by subsequent options, as in the option line.BR user,exec,dev,suid )..TP.B usersAllow every user to mount and unmount the file system.This option implies the options.BR noexec ", " nosuid ", and " nodev(unless overridden by subsequent options, as in the option line.BR users,exec,dev,suid )..RE.TP.B \-\-bindRemount a subtree somewhere else (so that its contents are availablein both places). See above..TP.B \-\-moveMove a subtree to some other place. See above..SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"The following options apply only to certain file systems.We sort them by file system. They all follow the.B \-oflag..SH "Mount options for adfs".TP\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fPSet the owner and group of the files in the file system (default: uid=gid=0)..TP\fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fPSet the permission mask for ADFS 'owner' permissions and 'other' permissions,respectively (default: 0700 and 0077, respectively).See also.IR /usr/src/linux/Documentation/filesystems/adfs.txt ..SH "Mount options for affs".TP\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fPSet the owner and group of the root of the file system (default: uid=gid=0,but with option.B uidor.B gidwithout specified value, the uid and gid of the current process are taken)..TP\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fPSet the owner and group of all files..TP.BI mode= valueSet the mode of all files to.IR value " & 0777"disregarding the original permissions.Add search permission to directories that have read permission.The value is given in octal..TP.B protectDo not allow any changes to the protection bits on the file system..TP.B usempSet uid and gid of the root of the file system to the uid and gidof the mount point upon the first sync or umount, and thenclear this option. Strange....TP.B verbosePrint an informational message for each successful mount..TP.BI prefix= stringPrefix used before volume name, when following a link..TP.BI volume= stringPrefix (of length at most 30) used before '/' when following a symbolic link..TP.BI reserved= value(Default: 2.) Number of unused blocks at the start of the device..TP.BI root= valueGive explicitly the location of the root block..TP.BI bs= valueGive blocksize. Allowed values are 512, 1024, 2048, 4096..TP.BR grpquota " / " noquota " / " quota " / " usrquotaThese options are accepted but ignored.(However, quota utilities may react to such strings in.IR /etc/fstab .).SH "Mount options for coherent"None..SH "Mount options for devpts"The devpts file system is a pseudo file system, traditionally mounted on.IR /dev/pts .In order to acquire a pseudo terminal, a process opens.IR /dev/ptmx ;the number of the pseudo terminal is then made available to the processand the pseudo terminal slave can be accessed as.IR /dev/pts/ <number>..TP\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fPThis sets the owner or the group of newly created PTYs tothe specified values. When nothing is specified, they willbe set to the UID and GID of the creating process.For example, if there is a tty group with GID 5, then.B gid=5will cause newly created PTYs to belong to the tty group..TP.BI mode= valueSet the mode of newly created PTYs to the specified value.The default is 0600.A value of .B mode=620and .B gid=5makes "mesg y" the default on newly created PTYs..SH "Mount options for ext"None.Note that the `ext' file system is obsolete. Don't use it.Since Linux version 2.1.21 extfs is no longer part of the kernel source..SH "Mount options for ext2"The `ext2' file system is the standard Linux file system..\" Due to a kernel bug, it may be mounted with random mount options.\" (fixed in Linux 2.0.4).Since Linux 2.5.46, for most mount options the defaultis determined by the filesystem superblock. Set them with.BR tune2fs (8)..TP.BR bsddf " / " minixdfSet the behaviour for the.I statfssystem call. The.B minixdfbehaviour is to return in the.I f_blocksfield the total number of blocks of the file system, while the.B bsddfbehaviour (which is the default) is to subtract the overhead blocksused by the ext2 file system and not available for file storage. Thus.RE.nf% mount /k -o minixdf; df /k; umount /kFilesystem   1024-blocks  Used Available Capacity Mounted on/dev/sda6      2630655   86954  2412169      3%   /k% mount /k -o bsddf; df /k; umount /kFilesystem   1024-blocks  Used Available Capacity Mounted on/dev/sda6      2543714      13  2412169      0%   /k.fi(Note that this example shows that one can add command line optionsto the options given in.IR /etc/fstab .).TP.\" Before Linux 2.3.99-pre3:.\" .BR check " / " check=normal " / " check=strict.\" Set checking level. When at least one of these options is set (and.\" .B check=normal.\" is set by default) the inodes and blocks bitmaps are checked upon mount.\" (which can take half a minute or so on a big disk, and is rather useless)..\" With strict checking, block deallocation checks that the block to free.\" is in the data zone..\" Since 2.3.99-pre3 but before 2.6.0-test7 every string check=foo.\" was equivalent to just check. Since 2.6.0-test7 only check is accepted..BR checkCheck filesystem (block and inode bitmaps) at mount time..\" requires CONFIG_EXT2_CHECK.TP.BR check=none " / " nocheckNo checking is done at mount time. This is the default. This is fast.It is wise to invoke.BR e2fsck (8)every now and then, e.g. at boot time..TP.B debugPrint debugging info upon each (re)mount..TP.BR errors=continue " / " errors=remount-ro " / " errors=panicDefine the behaviour when an error is encountered.(Either ignore errors and just mark the file system erroneous and continue,or remount the file system read-only, or panic and halt the system.)The default is set in the filesystem superblock, and can bechanged using.BR tune2fs (8)..TP.BR grpid " or " bsdgroups " / " nogrpid " or " sysvgroupsThese options define what group id a newly created file gets.When.BR grpidis set, it takes the group id of the directory in which it is created;otherwise (the default) it takes the fsgid of the current process, unlessthe directory has the setgid bit set, in which case it takes the gidfrom the parent directory, and also gets the setgid bit setif it is a directory itself..TP.BR nobhDo not attach buffer_heads to file pagecache. (Since 2.5.49.).TP.BR nouid32Disables 32-bit UIDs and GIDs.  This is for interoperability with olderkernels which only store and expect 16-bit values..TP.BR oldalloc " or " orlovUse old allocator or Orlov allocator for new inodes. Orlov is default..TP\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fPThe ext2 file system reserves a certain percentage of the availablespace (by default 5%, see.BR mke2fs (8)and.BR tune2fs (8)).These options determine who can use the reserved blocks.(Roughly: whoever has the specified uid, or belongs to the specified group.).TP.BI sb= nInstead of block 1, use block.I nas superblock. This could be useful when the filesystem has been damaged.(Earlier, copies of the superblock would be made every 8192 blocks: inblock 1, 8193, 16385, ... (and one got thousands of copies ona big filesystem). Since version 1.08,.B mke2fshas a \-s (sparse superblock) option to reduce the number of backupsuperblocks, and since version 1.15 this is the default. Notethat this may mean that ext2 filesystems created by a recent.B mke2fscannot be mounted r/w under Linux 2.0.*.)The block number here uses 1k units. Thus, if you want to use logicalblock 32768 on a filesystem with 4k blocks, use "sb=131072"..TP.BR user_xattr " / " nouser_xattrSupport "user." extended attributes (or not)..\" requires CONFIG_EXT2_FS_XATTR.TP.BR acl " / " noaclSupport POSIX Access Control Lists (or not)..\" requires CONFIG_EXT2_FS_POSIX_ACL.TP.BR grpquota " / " noquota " / " quota " / " usrquotaThese options are accepted but ignored..SH "Mount options for ext3"The `ext3' file system is version of the ext2 file system which has beenenhanced with journalling.  It supports the same options as ext2 aswell as the following additions:.\" .TP.\" .BR abort.\" Mount the file system in abort mode, as if a fatal error has occurred..TP.BR journal=updateUpdate the ext3 file system's journal to the current format..TP.BR journal=inumWhen a journal already exists, this option is ignored. Otherwise, itspecifies the number of the inode which will represent the ext3 file system'sjournal file;  ext3 will create a new journal, overwriting the old contentsof the file whose inode number is.IR inum ..TP.BR noloadDo not load the ext3 file system's journal on mounting..TP.BR data=journal " / " data=ordered " / " data=writebackSpecifies the journalling mode for file data.  Metadata is always journaled..RS.TP.B journalAll data is committed into the journal prior to being written into themain file system..TP.B orderedThis is the default mode.  All data is forced directly out to the main filesystem prior to its metadata being committed to the journal..TP.B writebackData ordering is not preserved - data may be written into the mainfile system after its metadata has been committed to the journal.This is rumoured to be the highest-throughput option.  It guaranteesinternal file system integrity, however it can allow old data to appearin files after a crash and journal recovery. .SH "Mount options for fat"(Note:.I fatis not a separate filesystem, but a common part of the.IR msdos ,.I umsdosand.I vfatfilesystems.).TP.BR blocksize=512 " / " blocksize=1024 " / " blocksize=2048Set blocksize (default 512)..TP\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fPSet the owner and group of all files. (Default: the uid and gidof the current process.).TP.BI umask= valueSet the umask (the bitmask of the permissions that are.B notpresent). The default is the umask of the current process.The value is given in octal..TP.BI dmask= valueSet the umask applied to directories only.The default is the umask of the current process.The value is given in octal. Present since 2.5.43.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -