Map disks or folders to windows from linux, ubuntu, etc.

linux mapping disk or folder to windows


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:

samba :

sudo apt-get install samba

smbclient :

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

Restart smbd

smbd restart

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

Insert picture description here


After success as follows:

Insert picture description here

5. Map network drive

In order to facilitate the use, we can map the network drive instead of inputting the ip address every time.

Insert picture description here


The final figure is as follows:

Insert picture description here


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.

Insert picture description here

That's it!