mount 命令 device 指定 none

本文解释了Linux系统中为何会将/run目录下的子目录作为单独的挂载点,并使用none类型进行挂载。这些子目录如/run/lock、/run/shm和/run/user等分别挂载了tmpfs文件系统,其目的是为了设置不同的权限和参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

From: http://unix.stackexchange.com/questions/136646/what-is-type-none-for-mount-points-and-why-are-mount-points-of-the-same-type-b

简要说明:这里的 none 就是表明非物理设备而是用于虚拟文件系统的。

问题:

In Ubuntu 14.04 when executing command mount I get following excerpt

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)

I do not understand why subdirectories of /run are mounted separately inside already mounted parent directory (/run) and what none filesystem means. My /etc/fstab file is empty.


回答:

The none just means that there is no physical disk partition linked to the mount point you see when issuing the mount command. It is used for virtual filesystems like shm, ramfs, proc and tmpfs. The lock, shm and user mount points in this example are created separately so they can be mounted with different permissions and settings. Notice the part inside the parentheses?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值