linux mapping disk or folder to windows
- 1. Install the samba package
- 2. Modify the configuration file
- 3. Restart smbd and set the username and password
- 4. Windows access
- 5. Map network drive
Most developers develop on the window, and there are few Linux desktop software. If you map the folder of the linux system to the window and modify the files directly on the window, the development speed will be much faster. Especially when you need to frequently use source insight to edit code, it is very convenient.
1. Install the samba package
First install the samba package on Ubuntu, the specific steps are:
sudo apt-get install samba
sudo apt-get install smbclient
2. Modify the configuration file
sudo gedit /etc/samba/smb.conf
Add at the end of the file:
[ShareFiles] comment = Shared Folder require password path = /home/wwwroot/lumen public = yes writable = yes valid users = root create mask = 0777 directory mask = 0777 force user = root force group = root available = yes browseable = yes
Here, change the
path = /home/wwwroot/lumenand
valid users = rootinto the path you need to map and your own username.
3. Restart smbd and set the username and password
Set username and password
smbpasswd -a your_username
Prompt to enter the password, enter the password you set twice.
4. Windows access
After entering the ip address of the linux system, press Enter, press Enter, and prompt to enter the account password
After success as follows:
5. Map network drive
In order to facilitate the use, we can map the network drive instead of inputting the ip address every time.
The final figure is as follows:
Then we can create a new si project locally and use si to edit it. Note that you must not create a si project on the server here. The project is locally and the code is on the server.