使用CIFS(Common Internet File System)的方法主要包括以下步驟:
安裝CIFS實用程式包。在Linux系統上,根據使用的Linux發行版,使用以下命令安裝CIFS實用程式包:在Ubuntu和Debian上,使用`sudo apt update`和`sudo apt install cifs-utils`;在CentOS和Fedora上,使用`sudo dnf install cifs-utils`。
配置Samba服務。首先,在Linux系統上安裝Samba服務,並配置其配置檔案`/etc/samba/smb.conf`。在配置檔案中,需要設定已分享資料夾、訪問許可權等。例如,可以設定`browseable=yes`表示目錄可瀏覽,`public=yes`表示對所有人公開,`writable=yes`表示目錄可寫入。
掛載CIFS Windows共享。使用`sudo mount -t cifs`命令掛載遠程Windows共享。例如,`sudo mount -t cifs -o username=//WIN_SHARE_IP//mnt/win_share`,其中`username`是共享賬戶的用戶名,`password`是共享賬戶的密碼,`WIN_SHARE_IP`是Windows共享的IP位址。
以上步驟可以幫助你在Linux系統上掛載和訪問Windows已分享檔案夾。請根據實際情況進行調整和配置。