Centos7挂载windows共享目录

将windows的共享目录挂载到Centos7

查看是否有mount.cifs命令,如果没有,在线安装


[root@dropbox-bak01 ~]# yum install cifs-utils -y

挂载windows共享文件夹


[root@dropbox-bak01 ~]# mount.cifs //10.150.50.10/Device /FTP/biaogan -o username=admin,password=3edc4EDC

#用户名和密码一定要小心特殊字符
如果有域,需要加domin
[root@dropbox-bak01 ~] mount.cifs //10.150.50.10/Device /FTP/biaogan/ -o username=t12462,password="3edc4EDC",domain=baidu

挂载完成后查看是否挂载成功

[root@dropbox-bak01 ~]# df -Th

写入/etc/fstab,开机自动挂载

[root@dropbox-bak01 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Dec 19 16:18:01 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=461f8609-e51c-4bbf-9ed4-35c18c984db3 /boot                   xfs     defaults        0 0
UUID=22E6-DD5E          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/centos-home /home                   xfs     defaults        0 0
/dev/mapper/centos-opt  /opt                    xfs     defaults        0 0
/dev/mapper/centos-var  /var                    xfs     defaults        0 0
/swapfile               swap                    swap    defaults        0 0
/SFDC_DATA/writer       /FTP_DATA/write         none    bind            0 0
//10.150.50.10/Device /FTP/biaogan cifs defaults,username=admin,password=3edc4EDC 0 0

[root@dropbox-bak01 ~]# mount -a       #mount -a 的意思是将/etc/fstab的所有内容重新加载
posted @ 2020-08-24 14:40  香菜哥哥  阅读(2673)  评论(0编辑  收藏  举报