Linux挂载Windows共享文件夹或硬盘分区

好久没使用过samba了,刚刚需要在Fedora9下挂载Windows共享时,准备使用smbmount,执行smbmount的时候,提示没有这个命令,系统samba也安装了呀,为什么没有呢,google下才知道,从Fedora9以后就没有smbmount这个概念了,而是使用cifs (Common Internet File Systemcifs),也就是说在这以后的系统直接使用mount加参数cifs就可直接挂载Windows的共享了.

使用方法:

先在你的xp电脑里面添加一个共享的文件夹linux

#mount -t cifs -o username=fish,password=fish //192.168.1.10/linux /mnt/linux

这样就可以了很是方便

但是如果你要挂载你的硬盘分区的话,同样设置你的硬盘分区d为共享但是主要你的共享名称一定要是英文

#mount -t cifs -o username=fish,password=fish //192.168.1.10/ld /mnt/d

这样也可以的

如果你要卸载你挂载的东西

#umount /mnt/linux

#umount /mnt/d

就可以了

备注:

说明一下,cifs是MS的一种通用的协议,Windows下的网上邻居访问其它计算机就是使用cifs协议.

CC BY-NC-SA 4.0 Linux挂载Windows共享文件夹或硬盘分区 by 桔子小窝 is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

发表回复

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据