在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
相關文章
相關標籤/搜索