将Windows里的F:\sadoc文件夹右键点击设置为共享目录,共享用户为administrator
# yum -y install cifs-utils #安装mount.cifs软件包
# mkdir /windows #创建挂载目录windows
# mount.cifs //10.0.0.1/sadoc /windows/ -o user=administrator,pass=linux #pass=linux为Windows里administrator用户的登陆系统密码。
# df -h #查看是否成功挂载
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
18G 4.3G 13G 26% /
tmpfs 490M 0 490M 0% /dev/shm
/dev/sda1 477M 64M 388M 15% /boot
//10.0.0.1/sadoc 501G 493G 7.5G 99% /windows
添加到开机自动挂载
echo “mount.cifs //10.0.0.1/sadoc /windows/ -o user=administrator,pass=linux” >>/etc/rc.loacl