首先,在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