When configuring the development environment, how to mount the folder under windows to linux below

  

To configure the development environment today, you need to mount the folder below windows to linux. The steps are as follows: 1. First share the directory to be mounted under Windows. 2. Make sure that linux and windows are in the same LAN. 3. Create a directory to be mounted under Linux. 4. Use the mount command to mount. 1mount -t cifs //ip /windows above the shared file name /linux above the mount point directory -o username = windows user, password = access to share the required password Note: This method is only temporarily used to use. It will be invalidated the next time it is restarted. So the way to automatically mount the linux boot is to add the following line after the /etc/fstab file. (This file needs to be modified by the root user)

//ip/windows above the shared file name /linux above the mount point cifs default, username=windows can access the shared user name, password= Access the password of the shared user 0 2

Note: The file below linux has the permissions of the user and the group to which it belongs. Mounted in the above method, the user and the group to which the file is mounted to linux are root. If you want to mount with other users and groups, you can change the line of /etc/fstab to:

//ip/windows above shared file name /linux above mount point cifs default, username=windows can access shared user name, password=access shared user password, uid=user id, gid = group id 0 2 where the user id is the id of the user you want to mount, and the id value can be viewed in the /etc/passwd file. Gid is equally available.

Copyright © Windows knowledge All Rights Reserved