有几种方法:
一种是mount -t cifs
一种是smbfs等
mount -t smbfs -o username=administrator,password=test123 //10.140.133.23/c$ /mnt/win
mount -t cifs -o username=administrator,password=test123 //10.140.133.23/c$ /mnt/win
mount -t smbfs -o username=,password= //局域网码郑IP共享目迟歼颂录 /挂载的目录
自启动挂载共享目录
vi /etc/fstab 最后加入
//局域网共享目录 /挂载的目录 smbfs defaults,auto,username=,password= 0 0
重启则自动挂载
*遇改漏到的问题:
有时候会有乱码,可以加上选项:codepage 和ipcharset
mount -t cifs -o codepage=936,iocharset=utf8,username=administrator,password="" //192.168.1.3/music /mnt/
可以把charset的编码修改一下,一般经常使用的是utf8或gb2312
linux访问Windows共享文件夹1.首先在mnt夹下建立共享文件夹,如share。
2.加载Windows系统的共享文件夹
在竖高卖Linux命令行下访问Windows共享文件夹的命令是:
mount -t cifs -o username=windowsusername //windows machine/sharefiles /mnt/localfolder
如:mount -t cifs -o username=guest,password= //192.168.1.102/mtv /mnt/share
其中:
windowsusername : Windows用户名
windows machine :Windows机器名
sharefiles :Windows共享文件夹名
然后就可以在 /mnt/localfolder 下访问Windows内容。
另外使用如下命令也可以在命令行环境查看Windows机器上的共享文件目录。
[root@localhost root]# smbclient -L //192.168.1.100
注:使用的是大写的L。
连接成功以后会显示WIndows机器上的共享文件目录的情念茄况,然后继续mount共余逗享文件夹就可以了。
3.取消访问命令:umount /mnt/localfolder
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)