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目录查看。挂载成功

 

转载于:https://www.cnblogs.com/wwyxyt/p/6734571.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值