在Linux系統下掛載Windows上的共享文件夾
阿新 • • 發佈:2018-02-18
bsp gpo src 用戶名 系統 str 路徑 centos7 radio
即可每次開啟自動掛載
使用掛載命令之前需要安裝cifs-utils
在Centos7下面用這個
yum install cifs-utils
安裝完畢後使用掛載命令完成掛載
在掛載之前需要創建被掛載的路徑
mkdir -p /mnt/hdf
掛載命令格式如下
mount -t cifs -o domain="FIRADIO",username="用戶名",password="密碼" //10.86.3.54/hdf$/Users/用戶名 /mnt/hdf
將上面的“用戶名”和“密碼”進行修改,這裏的用戶名不需要帶上@firadio.net的後綴
你可以將此命令打成一行,然後加入到crontab和/etc/rc.local
例如要掛載用戶名為asheng密碼123456的命令是
mount -t cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf
在crontab裏的命令是
* * * * * /sbin/mount.cifs -o domain="FIRADIO",username="asheng",password="123456" //10.86.3.54/hdf$/Users/asheng /mnt/hdf
在Linux系統下掛載Windows上的共享文件夾