Ubuntu Install Samba, Map Disk to Windows

2024.4.1by debix.io

1. Install samba

sudo apt-get install samba-common

dpkg -l | grep samba

2. Modify the configuration file

vim /etc/samba/smb.conf

Append to the end of the file:

[share]

       path=/home/fxs       // path is the path to the shared directory.

       writeable=yes

       browseable =yes

3. Add the username and password

smbpasswd -a fxs

4. Set 777 folder permissions under path

sudo chmod 777 fxs    // fxs is a shared directory


5. Restart samba

service smbd stop

service smbd start

6. Check ubuntu ip

ifconfig


7. Add the disc in windows explorer

·Type the ip address of Ubuntu and open it, Share means shared folder.



·Right click share and select Map the network drive


·The mapping is successful as below: