mount 命令详解

本文详细介绍了Linux系统的`mount`命令的使用方法,包括挂载文件系统、选项、操作以及不同类型的设备指定方式。重点讲解了如何挂载所有fstab文件中列出的文件系统,如何以只读或读写模式挂载,以及如何利用挂载点进行子树的绑定和移动。此外,还提到了挂载源和目标的指定,以及各种挂载选项的用途。
摘要由CSDN通过智能技术生成
Usage:
 mount [-lhV]
 mount -a [options]
 mount [options] [--source] <source> | [--target] <directory>
 mount [options] <source> <directory>
 mount <operation> <mountpoint> [<target>]

Options:
 -a, --all               mount all filesystems mentioned in fstab 挂载所有fstab文件中写入的文件系统
 -c, --no-canonicalize   don't canonicalize paths 不规范的路径
 -f, --fake              dry run; skip the mount(2) syscall  跳过系统调用
 -F, --fork              fork off for each device (use with -a)  强制执行 与-a一起使用
 -T, --fstab <path>      alternative file to /etc/fstab 可指定替代fstab的文件
 -h, --help              display this help text and exit 帮助文档
 -i, --internal-only     don't call the mount.<type> helpers 仅限制内部不调用挂载
 -l, --show-labels       lists all mounts with LABELs 列出带有标签的所有挂载
 -n, --no-mtab           don't write to /etc/mtab 不向mtab写入
 -o, --options <list>    comma-separated list of mount options 以逗号分隔挂载列表
 -O, --test-opts <list>  limit the set of filesystems (use with -a) 限制文件系统集
 -r, --read-only         mount the filesystem read-only (same as -o ro) 只读方式挂载
 -t, --types <list>      limit the set of filesystem types 限制文件系统类型
     --source <src>      explicitly specifies source (path, label, uuid) 明确挂载源
     --target <target>   explicitly specifies mountpoint 明确挂载点
 -v, --verbose           say what is being done 显示详细信息
 -V, --version           display version information and exit 显示版本信息
 -w, --rw, --read-write  mount the filesystem read-write (default) 以读写方式挂载

 -h, --help     display this help and exit 帮助
 -V, --version  output version information and exit 版本

Source:
 -L, --label <label>     synonym(同义词) for LABEL=<label>
 -U, --uuid <uuid>       synonym for UUID=<uuid>
 LABEL=<label>           specifies device by filesystem label
 UUID=<uuid>             specifies device by filesystem UUID
 PARTLABEL=<label>       specifies device by partition label
 PARTUUID=<uuid>         specifies device by partition UUID
 <device>                specifies device by path
 <directory>             mountpoint for bind mounts (see --bind/rbind)
 <file>                  regular file for loopdev setup

Operations:
 -B, --bind              mount a subtree somewhere else (same as -o bind) 
 -M, --move              move a subtree to some other place
 -R, --rbind             mount a subtree and all submounts somewhere else
 --make-shared           mark a subtree as shared
 --make-slave            mark a subtree as slave
 --make-private          mark a subtree as private
 --make-unbindable       mark a subtree as unbindable
 --make-rshared          recursively mark a whole subtree as shared
 --make-rslave           recursively mark a whole subtree as slave
 --make-rprivate         recursively mark a whole subtree as private
 --make-runbindable      recursively mark a whole subtree as unbindable
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

_c G

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值