linux系统mount命令挂载windows系统共享文件夹
此方法在学习工作中还是比较好用的。方法如下:
1.首先将windows系统文件夹共享
2.linux系统使用以下命令,将共享文件夹挂载。
mount -t cifs //192.168.1.102/studyshare /mnt -o username=chocolee
cifs为文件系统
192.168.1.102为WIN主机IP地址
studyshare为共享文件夹名
mnt 为挂载点
username=chocolee win系统的用户,是对此共享文件夹有权限的用户哦!
注:
[[email protected] ~]# mount -t cifs //192.168.1.102/studyshare /mnt -o username=chocolee
Password:
[[email protected] ~]#
敲完命令会让你输入chocolee的密码,没有任何的报错,那么基本证明挂载成功了。
[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 12G 2.4G 8.3G 23% /
tmpfs 181M 0 181M 0% /dev/shm
/dev/sda1 194M 28M 156M 16% /boot
//192.168.1.102/studyshare
98G 31G 68G 32% /mnt
3.测试
linux系统上创建测试文件:
[[email protected] ~]# cd /mnt/
[[email protected] mnt]# touch test.sh #创建测试文件test
[[email protected] mnt]# ll
total 0
-rwxr-xr-x 1 root root 0 Mar 18 00:51 test.sh
win系统上查看:
OK,成功喽~~~希望对各位在学习工作中有所帮助!
转载于:https://blog.51cto.com/harles/1378730