zoukankan      html  css  js  c++  java
  • linux挂载windows共享目录

    今天学习了如何使用linux挂载windows共享目录。

    1.先在windows下面共享需要挂载的目录。 

    右键共享目录的属性。修改为共享权限。

    然后选择安全,选择共享时候输入的用户名和密码。

    2、确保linux与windows是在同一个局域网当中。 
    3、在linux下面创建一个需要挂载到的目录。 
    4、利用mount命令进行挂载。

     mount -t cifs -o username="wangwang",password="wangdan520217" //DESKTOP-AVNCIGS/tomcat /mnt/pacth

    其中 //DESKTOP-AVNCIGS/tomcat为windows的共享目录, /mnt/pacth为linux的挂载目录,要先创建。

    遇见问题,在进行挂载的时候一直报错。

    mount: wrong fs type, bad option, bad superblock on //DESKTOP-AVNCIGS/tomcat,
    missing codepage or helper program, or other error
    (for several filesystems (e.g. nfs, cifs) you might
    need a /sbin/mount.<type> helper program)
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    解决方法:是因为没有安装cifs

      root@test:~# mount.cifs
    The program 'mount.cifs' is currently not installed.  You can install it by typing:
    apt-get install cifs-utils

    因为没有安装cifs工具集

    apt-get install cifs-utils就ok了。

    安装成功后,再次执行命令,成功,linux目录查看。挂载成功

  • 相关阅读:
    LeetCode 43 字符串相乘
    HDU 1031 Design T-Shirt
    HDU 1728 逃离迷宫
    HDU 1285 确定比赛名次
    HDU 1116 Plays on words
    HDU 1195 Open the lock
    HDU 1072 Nightmare
    HDU 1272 小希的迷宫
    HDU 1273 漫步森林
    HDU 1269 迷宫城堡
  • 原文地址:https://www.cnblogs.com/wwyxyt/p/6734571.html
Copyright © 2011-2022 走看看