TECHNIG
Gateway for IT Experts and Tech Geeks

How to Share File between Ubuntu and Windows 10?

In a network where you have Windows and Linux Ubuntu operating system, it is a bit difficult to share file between Ubuntu and Windows. The best way to share file between Ubuntu and Windows, you need to install and configure Samba as a file server in Ubuntu Linux. The Samba server will simply let you share files with Windows and Linux Ubuntu.

1. Installing Samba in Ubuntu

Samba is a free software re-implementation of the SMB/CIFS networking protocol. Samba provides file and print services for various Windows clients and can integrate with a Windows Server domain, either as a Domain Controller (DC) or as a domain member. So in this article, we are using in Per-to-Per network between Windows clients and Linux Ubuntu clients. If you don’t like reading then watch the video tutorials at the end of this post.

  1. To install Samba file server in Ubuntu Linux, run the terminal by pressing Ctrl+Alt+T keys to open Linux terminal command-line interface.
  2. Now type the “sudo apt-get install Samba” to install Samba file server. Type the password to start the installation.
Installing App In Ubuntu Linux
Installing App In Ubuntu Linux

Remember; your Ubuntu machine must be connected to the internet. Because this apt-get install command will install software from Ubuntu online software repository.

2. Share File Between Ubuntu and Windows

Let’s do how to share a file in Ubuntu through file explorer? Open the File and create a folder in the Home directory. I have created Netdata folder and required to share it.

  1. Right-click the Netdata folder and click Local Network Share. Select Share this folder.
Share File Between Ubuntu and Windows
Share File Between Ubuntu and Windows

To allow modification to files and folder for users, select Allow others to create and delete files in this folder. Also, select Guest access (for people without a user account) to access files from Windows without requiring user and password.

2. Click Add the Permissions automatically to apply the permission to the shared folder.

Add the Permissions automatically
Add the Permissions automatically

If you want to set a password for a shared folder, you shout set a user for Samba file server with “sudo smbpasswd -a Shais” command then type the password twice.

Set a Password to Samba File Server
Set a Password to Samba File Server

Now it asks your user and password when someone wants to access the shared folders. The file-sharing from Ubuntu Linux has completed successfully. Let’s test it from Windows 10 client.

3. Access Shared Folders from Windows 10

You can access the Linux shared folders from Windows 10 using Network section. To simply access the shared folders type the \\IP address\Shared folders.

  1. In Windows 10 type \\192.168.0.104\NetData and press enter to open the shared files of Linux Ubuntu.
Access Network Shared Files
Access Network Shared Files

2. When prompt for network credential, type the user name and password. If you did not set a password for Samba files server, it would not ask the network credentials.

Network Credentials
Network Credentials

3. It’s all the contents of a shared folder. You can create and delete files or edit the files.

Network Shared Files
Network Shared Files

To access the shared files quickly, create a shortcut link to a shared folder in Windows 10.

Create A Shortcut Link
Create A Shortcut Link

Right-click on the desktop and click New then click Shortcut.

Create Shortcut Link
Create Shortcut Link

Type the network address of shared folder in Type the location of the item: and click Next.

Type a name for Shortcut Link
Type a name for Shortcut Link – Share File between Ubuntu and Windows

Type a name for shortcut related to the contents of the shared folder and click Finish to create the shortcut.

Linux Shared Files
Linux Shared Files

Here is the shortcut link to the NetData shared folder of Ubuntu Linux. Double click to open it from your desktop. You can create a network Map drive also. To create a network map drive, read this article How to Create Map Network Drive In Windows 10 and Server?

Share File between Ubuntu and Windows 10 – Video Tutorials

We hope this Share File between Ubuntu and Windows article helped you to share file between Ubuntu and Windows 10 easily like a pro-Linux user.

Troubleshoot File Sharing Between Ubuntu and Windows

The above article and video are a simple file sharing between Windows 10 and Linux Ubuntu. I didn’t assign a user to Samba file server on Linux. Because of this, a user on Technig Youtube channel asked a good question about sharing files and user permissions.

Asked by Ramsin Eivaz: question if I want a user and password, I assume I have to check only “allow others to create…” and not the guest access. But when I enter the Ubuntu user and password, it is not able to log in!! would you have any suggestions thanks.

Answer: You need to create a user account and add the user to the Sambashare group. Then when you access the folder from Windows clients, you should use that username and password for viewing the shared files and folders.

1. First, try to create a user in Ubuntu with “useradd” command or another command that help you create a user.

“sudo useradd -M -N -g sambashare Ali”

The -M parameter will not create a home directory for this user and the -N will not create a group with the same username. The -g parameter just specify the group name.

I have created the username “Ali” and added to “sambashare” group.

2. Let’s set a password for the Samba user with “smbpasswd” command.

“sudo smbpasswd -a Ali”
[sudo] password for shais:
New SMB password:
Retype new SMB password:

3. Now from Windows 10, type this username and password to access the contents of a shared folder.

Finally, thanks for sharing the feedback, issues, and problems. Your comments help us to make articles better.

29 Comments
  1. Michael says

    Doesn’t work. I run:

    \\192.168.0.14\NetData (Yes mine is named exactly like yours)

    After about a minute or so, I get an error:

    Windows cannot access \\192.168.0.104\NetData

    Details: The Network Path was not found.

    Any ideas? Running Windows 10 and Ubuntu 14.04.

    1. Shais says

      Hi Michael,
      1. Is this IP address (192.168.0.14) exactly your Ubuntu IP address? Find out your Ubuntu IP address and try again.
      2. Dose your devices are in the same network? Once ping and make sure that ping reply successfully.

      Let us know the result please.

  2. gary says

    This worked perfectly for me. Thanks so much

    1. Shais says

      Yes it must work, we first test and sharing.

  3. kaisuj says

    Thanks for your advice. I forgot that Windows uses backslasles instead of slahes in network addresses.

    1. Shais says

      You welcome Kaisuj

  4. wickee-wickee says

    THANK YOU! THANK YOU! THANK YOU! Worked perfectly.

  5. supernano says

    What if I want it the other way around? I have a folder in my Windows 10 PC that I want to be able to view from my Linux system. How do I do that?

    1. Shais says
  6. supernano says

    Thanks! That was embarrassing, should’ve looked through your blog a bit before asking LOL

    1. Shais says

      Don’t worry, feel free to ask your questions regarding to website categories. We are here to help our readers quickly.

  7. radu says

    Thanks for the guide but i don’t seem to be able to get it working.
    I’m trying to share an entire partition (or even a folder) on a netbook running ubuntu 16.04 LTS and access it on a PC running Windows 10 Pro, both connected to the same wireless network ( personal).
    Thing is windows 10 pc is able to see the shared folder on the ubuntu netbook while in network discovery window, but if i try to actually open the shared folder/partition, windows 10 reports back an error saying i’m not allowed to access that resource and to contact the network admin.
    Going back to the ubuntu machine, i didn’t set any user for the samba server, and i also allowed even guests to connect to the shared drive/folder – no luck whatsoever.
    I then googled around and found about modifying a registry value in windows 10 but that didn’t help either.
    Now i’m kinda stuck because i’m unsure if the problem lies in the ubuntu machine or the windows machine.
    I’m prone to believe it’s the crappy windows behaving badly, they ruined the simple network sharing with the arrival of windows vista.
    Any thoughts? Thanks in advance!

    1. Shais says

      Hi Radu,
      To fix the You are not allowed to access error, try to set NTFS modify permission to everyone group from security tab of shared folder on Windows machine.

      This article help you to configure shared folder on Windows 10. https://www.technig.com/share-files-via-linux-mint-to-windows-10/

  8. It does not work says

    When i try to browse shared folder, i get window with request of user name, password and domain, and no access in it, just see folder name “temp” in file browser.

    I’m try share folder “temp” on NTFS partition, like the way you do. But in window “Folder share”, button “Create Folder” from your tutorial, in my case this button named “Apply”, and when i press on it, it does not show up any window with button “Add permission automatically”.

    This i found in “/var/log/samba/log.sasha”

    ../source3/param/loadparam.c:3259(process_usershare_file)
    process_usershare_file: stat of /var/lib/samba/usershares/temp failed. Permission denied

    This Ubuntu:
    Ubuntu 16.04.1 LTS

    1. Shais says

      Just share folder and assign ntfs permission on Windows and enable network discovery as well. It must work without any problem.

  9. Bill says

    Thanks a bunch for this article. It worked like a charm.

  10. Mihai says

    Hi, i’m trying to make 4 folders to share, each one to be accessed by specified ip not by user and pass. must create groups?

  11. Henry Law says

    Followed instructions carefully but get an error message when I try to open the Windows-Network icon on another Ubuntu machine.

    Samba used to be easy to set up and work, then it broke on updates, so I gave up on it.

    1. Shais says

      Please if you can share the exact error when you connect to Windows.
      It helps us to know, what the issue is about?

  12. Henry Law says

    Client computer also running Ubuntu sees nothing. testparm on the host shows no change to smb.conf

  13. Henry Law says

    The problem was at the client end – Nautilus.

    The easiest work around it to use Dolphin and select “Connect to server”, then type in the IP address of the server in the form
    smb://{ip-address-of-server}

    (without the curly brackets)

    You get the server IP address from typing ifconfig in a terminal.

  14. Bill Maxwell says

    I followed the Steps exactly as shown and get Network not found. I can Ping both ways between Windows 10 and Ubuntu.

  15. Bill Maxwell says

    I found the problem. Zorin’s Firewall was blocking incoming connections. Set it to allow and all is working now. I can access Zorin/s Documents Folder from Windows 10 and visa versa.

  16. Khoa says

    Thank Bro!! It worked perfectly!!

  17. Rob says

    will this work continuously? thinking that the ip address dynamically changes…

  18. Doc Mckaig says

    thank you, 137 years ago when I was doing acoustic research a friend set up samba for me between file servers and main computer so I knew what was possible…never could have done it myself without your excellent tutorial.

    1. Shais says

      137 Years ago!

      Thanks for the feedback.

  19. Eddie McGlone says

    Thank you. I’ve been chasing around trying different solutions without having much luck when I came across your tutorial. Nowhere else mentioned the need to create a samba user account – that’s what made the difference.

  20. Arantxa says

    Hello Shais,
    Have you ever dealt with a gray cross in every corner of a file/directory’s icon in windows? Yesterday my Ubuntu 20.04 folder named “Público” and any of its files could be accessed by any of my Windows 8.1 machines. Today I moved some extra files/folders to “Público” and now they cannot be accessed. The message error is: “invalid identifier”. With the previous ones, nothing changed and they are still available. I tried to clean it by “reinitialize the cache of offline files” using a support forum from Microsoft: “REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Csc\Parameters /v FormatDatabase /t REG_DWORD /d 1 /f”
    But nothing worked. I would appreciate some help.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

where to buy viagra buy generic 100mg viagra online
buy amoxicillin online can you buy amoxicillin over the counter
buy ivermectin online buy ivermectin for humans
viagra before and after photos how long does viagra last
buy viagra online where can i buy viagra