美文网首页
如何理解 mount 含义

如何理解 mount 含义

作者: ChandlerBing | 来源:发表于2021-11-23 11:06 被阅读0次

如果想要使用某个外在的设备,或者使用某大页内存文件,我们经常需要对外设或者大页内存文件做 mount 操作。
那么 mount 的含义是什么,为什么需要 mount ?
在 Linux 系统中,一切都是文件,包括外在设备。要访问设备,就需要将文件与我们的文件树关联起来。在 Linux 中所有的文件都被组织在一个树形目录下,根目录是 '/' 。新加入的设备要想能被正常访问,就要将设备放在目录树的某个目录下,这就是通过 mount 实现的。

参考:
https://unix.stackexchange.com/questions/3247/understanding-mount-as-a-concept-in-the-os

As fschnitt points out, a comprehensive answer to this would likely be a chapter in a systems administration manual, so I'll try just to sketch the basic concepts. Ask new questions if you need more detail on specific points.
In UNIX, all files in the system are organized into a single directory tree structure (as opposed to Windows, where you have a separate directory tree for each drive).
There is a "root" directory, which is denoted by /, which corresponds to the top directory on the main drive/partition (in the Windows world, this would be C:). Any other directory and file in the system can be reached from the root, by walking down sub-directories.
How can you make other drives/partitions visible to the system in such a unique tree structure? You mount them: mounting a drive/partition on a directory (e.g., /media/usb) means that the top directory on that drive/partition becomes visible as the directory being mounted. Example: if I insert a USB stick in Windows I get a new drive, e.g., F:; if in Linux I mount it on directory /media/usb, then the top directory on the USB stick (what I would see by opening the F: drive in Windows) will be visible in Linux as directory /media/usb. In this case, the /media/usb directory is called a "mount point".
Now, drives/partitions/etc. are traditionally called "(block) devices" in the UNIX world, so you always speak of mounting a device on a directory. By abuse of language, you can just say "mount this device" or "unmount that directory".
I think I've only covered your point 1., but this could get you started for more specific questions.
Further reading: * http://ultra.pr.erau.edu/~jaffem/tutorial/file_system_basics.htm

相关文章

  • 如何理解 mount 含义

    如果想要使用某个外在的设备,或者使用某大页内存文件,我们经常需要对外设或者大页内存文件做 mount 操作。那么 ...

  • Linux mount

    理解Mount 挂载 (mount) 深入理解 bind mount 将目录挂载到目录 mount --bind ...

  • 认识失败

    什么叫失败?什么情况可以叫失败?如何定义失败?我们要如何理解失败的更深含义? 失败从字典的含义是"...

  • 如何理解“幸福”的含义?

    【导语】王菲,桓台县荆家镇中心中学的普通教师。而这位“普通”的老师却做着“不普通”的事情。她从一位独立创业的瑜伽老...

  • NFS attribute cache

    参数指定 mount时候可以提供参数ac或者noac设置attribute cache参数。具体含义参考 Linu...

  • linux 虚拟文件系统(VFS)---实现一个无持久存储文件系

    Linux 2.6.34 1.mount命令如何调用到sys_mount?(用的linux0.1.1看的 【嘿嘿】...

  • 理解含义

    什么是要约邀请?什么是要约? 这个超市发了很多很多小广告,那么这个广告就是要约邀请。 而如果有的人拿着这个小广告到...

  • 16 Linux中的挂载命令

    挂载命令(可理解为分配盘符) (1)查询与自动挂载 mount 查询系统中已挂载的设备mount -a 依据配置文...

  • 2019-03-10 《写作》拆书稿大纲

    《写作》拆书稿大纲 第一讲:如何理解主题的含义,掌...

  • 机会与梦想,旧的与新的

    你理解机会的含义吗? 你理解梦想的含义吗? 你真的理解机会的含义吗? 你真的理解梦想的含义吗? 梦想是抽象的, 令...

网友评论

      本文标题:如何理解 mount 含义

      本文链接:https://www.haomeiwen.com/subject/xjhwtrtx.html