Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

挂载 mount/umount

  • mount 挂载系统外的文件(设备/磁盘)

    • mount /dev/hda1 /mnt
      • 把 磁盘hda1(称为设备名) 挂载到 根目录下的mnt文件夹(称为挂载点)
      • 可加参数-o ro设置成只读模式
      • 如果运行df命令,输出的
        • 第1列就是 设备名
        • 最后1列就是 挂载点
      • 例子
        sudo mount -t nfs -o vers=4.0,noresvport 172.20.0.6:/mnt/res_files /mnt/res_files
        
  • umount 卸载 系统外的文件/磁盘

    • umount /dev/hda1 (指定设备名)把 磁盘hda1 卸载掉
    • umount /mnt (指定挂载点)把 mnt文件夹 对应设备 卸载掉