Quickly Enable File Sharing Between Windows 10 and Ubuntu 17.04 | 17.10

One of the most common ways to get Windows and Ubuntu to share files and printers is via Samba (CIFS). Windows already has a file and printers sharing protocol enabled. To enable it on Ubuntu, install Samba.

If you want to quickly enable file sharing between Windows and Ubuntu, this post will show you how. The Ubuntu desktop will be configured to share files with any client on the network without prompting for a password.

This tutorial is going to show students and new users how to quickly turn on file sharing on Windows and install Samba on Ubuntu to enable file sharing. When you’re ready, continue below.

Step 1: Enable Windows Filesharing

To make fileshare possible, it must be enabled on the systems that are sharing. To enable file sharing on Windows, run the commands prompt as administrator and run the commands below

Then run the commands below to enable filesharing and network discovery.

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes

Step 2: Install Samba on Ubuntu

Next, run the commands below to install Samba package on the Ubuntu desktop. Samba enables files and printer sharing on Ubuntu systems.

sudo apt update
sudo apt install samba samba-common python-glade2 system-config-samba

Step 3: Find Windows Workgroup

Now both Windows and Ubuntu machines have filesharing installed and enabled. To make filesharing run smoothly among client computers, they must be in the same workgroup.

Run the commands below to find Windows computer workgroup.

net config workstation

The Workgroup information should be displayed on the line that starts with Workstation domain. You need this info so you can configure the Ubuntu machine with the same workgroup.

Step 4: Configure the Ubuntu machine to join Windows Workgroup

Now that you know Windows workgroup, run the commands below to open Samba default configuration file on Ubuntu

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo nano /etc/samba/smb.conf

Then copy the paste the lines below into the file and save.

workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
name resolve order = bcast host
dns proxy = no

# add to the end
   comment = Ubuntu File Share
   path = /srv/samba/share
   browsable = yes
   writable = yes
   guest ok = yes
   read only = no
   create mode = 0777
   directory mode = 0777
   force user = nobody

Save and exit

Step 5: Create the Ubuntu Share

Next run the commands below to create the share you’re sharing in the config file.

sudo mkdir -p /srv/samba/share
sudo chown nobody:nogroup /srv/samba/share
sudo chmod -R 0777 /srv/samba/share

Finally, run the commands below to restart Samba

sudo systemctl restart smbd.service nmbd.service

Open Windows File Explorer and you should see Ubuntu shared folder and any Shared folder on the Windows machine will be viewed on the Ubuntu machine as well.


You may also like the post below:


  1. Great job

  2. It works but it is incredibly slow (even on a 1Gbps connection)

  3. Well I did all this and I could see the Samba folder in Ubuntu 18 and managed to add a new folder in it and a file too, and looked back into windows 10 and didn’t know where to look for this new folder and file I created. They didn’t appear under “Network” in the file browser.
    Any help?

    1. Did you ever find a solution to your problem? I didn’t find it either

  4. I have to say thank you because at last I can connect my machines. I have tried for ages and your way worked straight away – no nonsense. I have always seen my ubuntu machine from windows but not the other way. I put smb://ipaddress/Users/Username and bingo.

  5. Thank you. I tried at least 10 other sites and instructions dont work. This is the only site that worked for me. Using VMWare Player 12 with a Windows 10 Host and ubuntu 18 Guest.

  6. Great stuff. One thing though. In smb.conf under [public] section remove line ‘force user = nobody’. It prevented me from copying entire folders, only single files.

  7. Tried this in Ubuntu 18.04, see the Windows Network in Nautilus and my Ubuntu machine in Win 10 but when I try to move anything over to the Windows machine I get:
    “Failed to receive share list from server: No such file or directory”

  8. I am getting error
    [email protected]:~# sudo systemctl restart smbd.service nmbd.service
    System has not been booted with systemd as init system (PID 1). Can’t operate.

  9. directory mode 0777
    should be
    directory mode = 0777

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.