Linux 下访问Windows共享目录

5、安装cifs-utils软件包

# yum install cifs-utils

貌似可以不用安装这个包。

6、在Linux下创建一个挂载点

# mkdir  /mnt/Windows

7、挂载Windows上的共享目录d: edhat_disk到Linux下的/mnt/Windows目录下

# mount -t cifs -o username=test password=test  //192.168.1.123/redhat_disk /mnt/Windows

这里是一次性的。重启会话失效。

8、如果挂载成功,则可以进入/mnt/Windows下,新建一个文件,看看Windows上能否看见

9、在/etc/fstab文件中,加入该共享目录的挂载信息

//192.168.1.123/redhat_disk      /mnt/Windows    cifs    username=tommy,password=111111  0 0

永久的生效。

10、到此为止,Windows上的共享目录//192.168.1.123/redhat_disk就被成功挂载到了Linux上面了,并且Linux重启后,会自动挂载该目录到/mnt/Windows目录下