SoFunction
Updated on 2025-03-10

Access (mount) shared folders for linux on Windows

1 Install samba on linux

sudo yum install sambaorsudo apt-get install samba

2 Create a shared folder on linux

This folder iswindowsThe folder you can see on
mkdir /shared_folder   

3 Add samba user and password

Add a user
useradd username
Add a password for this user,Enter the car to enter the password
smbpasswd -a username

If there is an error above, it may be that the permissions are insufficient. Add sudo in front

4 Modify the samba configuration file

cd /etc/samba
sudo vi 

Add the following paragraph to the end of the file

[username]
 		comment = username
		path = /shared_folder  
 		public = yes
		writable = yes

Save Exit

5 Restart Samba

sudo systemctl restart smb

6 Test connection on windows

Enter \ip_addr in the file manager to connect to your target linux machine. Enter samba's username and password to connect.

The above is the detailed content of the shared folders for accessing (mounting) Linux on Windows. For more information about accessing Linux files on Windows, please follow my other related articles!