在Linux系统下挂载Windows上的共享文件夹

使用挂载命令以前须要安装cifs-utilsdom

在Centos7下面用这个spa

yum install cifs-utils

安装完毕后使用挂载命令完成挂载.net

在挂载以前须要建立被挂载的路径code

mkdir -p /mnt/hdf

 

挂载命令格式以下blog

mount -t cifs \
-o domain="FIRADIO",\
username="用户名"\
,password="密码" \
//10.86.3.54/hdf$/Users/用户名 \
/mnt/hdf

将上面的“用户名”和“密码”进行修改,这里的用户名不须要带上@firadio.net的后缀crontab

你能够将此命令打成一行,而后加入到crontab/etc/rc.local便可每次开启自动挂载ci

例如要挂载用户名为asheng密码123456的命令是io

mount -t cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf

 在crontab里的命令是class

* * * * * /sbin/mount.cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf
相关文章
相关标签/搜索