ubuntu挂载Windows共享文件夹

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

1.mount方式:关机失效

win主机IP192.168.1.100,共享目录workspace

mount -t cifs -o username='echo',password='123456' //192.168.1.100/workspace  /mnt/share 

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*

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

参考网址:http://blog.csdn.net/u012207077/article/details/14446603

http://www.centoscn.com/CentOS/Intermediate/2014/0318/2619.html

http://www.cnblogs.com/dingyingsi/archive/2013/04/16/3023392.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章