在Linux系統下掛載Windows上的共用資料夾

來源:互聯網
上載者:User

標籤:sbin   mnt   行修改   etc   需要   技術分享   util   title   domain   

使用掛載命令之前需要安裝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上的共用資料夾

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.