linux and window are file mounts

 

1. First create a share folder under Windows and set the share (right click -> Properties -> Share)
2. Make sure that ubuntu has installed mount.cifs, apt-get install mount.cifs or replace it with (cifs-utils)
3. ubuntu Create /mnt/winshare under /mnt/winshare for mounting shared files

$ sudo mkdir /mnt/shareFolder
$ sudo chmod 777 /mnt/shareFolder


4. sudo mount -t cifs //(win-server)/htdocs /mnt/winshare -o username="win ​​username",password="win ​​password",iocharset=utf8,dir_mode=0777,file_mode=0777,uid ="1000",gid="1000"

Description: win-server can be ip or host name, username and password are the Win system user and password, uid and gid specify the owner and group of the file mounted under ubuntu, dir_mode, file_mode specify the directory and file operation permissions under ubuntu (using chmod chown is invalid)

5. Automatically mount at boot, add the above mount command in /etc/rc.local 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853052&siteId=291194637
Recommended