zoukankan      html  css  js  c++  java
  • Linux之文件挂载

    首先,在Windows设置需要共享的文件夹;然后使用如下两个方式将共享文件夹挂载到Ubuntu系统中,

    1.mount方式:关机失效

    windows主机IP:192.168.1.100,共享目录WindowsShare

    命令 mount -t cifs -o username='echo',password='123456' //192.168.1.100/WindowsShare  /mnt

    //mount -t cifs -o username='pyu',password='pyu' //192.168.1.116/WindowsShare /mnt

    umount /mnt 卸载

    不要在挂载目录/mnt/..中执行卸载命令,否则报错

    若有多个Linux挂载了同一个Windows的共享目录,其中的一个Linux执行umount /mnt 卸载了,不影响其他Linux的使用

    2.通过修改fstab文件,支持开机自动挂载

    修改/etc/fstab文件,文件最后加入:

    //192.168.1.100/workspace   /mnt/share cifs  auto,username=‘echo’,password=‘123456’  0 0 

    其中username是Windows系统的用户名,密码为Windows用户密码。

    在执行指令的时候,如果不安装cifs可能会报mount:cannot mount block device,安装指令如下:sudo apt-get install cifs*

    安装完后即可实现共享文件的挂载。

    使用mount 挂载Windows中的共享文件

    mount -t cifs -o username='pyu',password='pyu' //192.168.1.116/WindowsShare /mnt

  • 相关阅读:
    DGL学习(六): GCN实现
    DGL学习(五): DGL构建异质图
    DGL学习(四): 图分类教程
    LuoGuP2495:[SDOI2011]消耗战
    LuoGuP1121:环状最大两段子段和
    LuoGuP3177:[HAOI2015]树上染色
    LuoGuP2607:[ZJOI2008]骑士
    HDU4283:You Are the One
    LuoGuP4294:[WC2008]游览计划
    LuoGuP4127:[AHOI2009]同类分布
  • 原文地址:https://www.cnblogs.com/gzu-link-pyu/p/7629944.html
Copyright © 2011-2022 走看看