Hướng dẫn mount Windows share trên Ubuntu 20.04
- Tuan Nguyen 
- Jan 6, 2021
- 1 min read

IP máy windows share: 192.168.1.100
Thư mục share: windows_share
User được gán quyền trên thư mục share: windows_user
Password của user được gán quyền share: 1234@123
Cài CIFS
$ sudo apt-get update$ sudo apt-get install cifs-utilsTạo thư mục để mount
$ sudo mkdir /data/backupKiểm tra mount trực tiếp
$ sudo mount -t cifs -o username=windows_user, password=1234@123 //192.168.1.100/windows_share /data/backupNếu mount thành công ta thực hiện bước tiếp theo
Tạo cifs-credential file
$ sudo nano /etc/cifs-credentitalNội dung file cifs-credentital
user=windows_user
pass=1234@123Cấu hình tự động mount trong file fstab
$ sudo nano /etc/fstabNội dung file fstab
//192.168.1.100/windows_share /data/backup cifs credentials=/etc/cifs-credential,file_mode=0755,dir_mode=0755 0 0Có thể kiểm tra bằng lệnh
$ df -Th




Comments