Scroll To Top

How to Share File between Ubuntu and Windows 10?

Posted in Linux, Windows2 years ago • Written by Shais21 Comments

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 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” in order 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 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 Home directory. I have created Netdata folder and required to be 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 shared folder.

Add the Permissions automatically

Add the Permissions automatically

If you want to set a password for 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 ask you user and password when someone want to access the shared folders. The 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 \\\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 will not ask the network credentials.

Network Credentials

Network Credentials

3. It’s all the contents of 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 shared folders contents 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 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

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 login!! would you have any suggestions thanks.

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

1. First try to create a user in Ubuntu with “useradd” command or other 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 user name. The -g parameter just specify the group name.

I have created user name “Ali” and add it 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 user name and password in order to access the contents of shared folder.

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

TAGS: , , , ,
About this Author

I'm a network and Information Security instructor. Here is my online pictorial notebook. I would like to write and share my experience through this website for computer enthusiasts and technology geeks.

Like us on Facebook
on Facebook

Follow me on Twitter
Follow @technigs on Twitter
Add me on Google+
on Google+

21 Comments so far. Feel free to join this conversation.

  1. MichaelNovember 27, 2015 at 11:52 pm - Reply

    Doesn’t work. I run:

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

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

    Windows cannot access \\\NetData

    Details: The Network Path was not found.

    Any ideas? Running Windows 10 and Ubuntu 14.04.

    • Shais
      ShaisNovember 28, 2015 at 12:03 am - Reply

      Hi Michael,
      1. Is this IP address ( 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. garyFebruary 10, 2016 at 4:02 am - Reply

    This worked perfectly for me. Thanks so much

    • Shais
      ShaisFebruary 10, 2016 at 7:43 pm - Reply

      Yes it must work, we first test and sharing.

  3. kaisujFebruary 15, 2016 at 10:09 pm - Reply

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

    • Shais
      ShaisFebruary 16, 2016 at 1:17 am - Reply

      You welcome Kaisuj

  4. wickee-wickeeMarch 7, 2016 at 5:30 am - Reply

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

  5. supernanoApril 13, 2016 at 2:36 am - Reply

    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?

  6. supernanoApril 13, 2016 at 12:33 pm - Reply

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

    • Shais
      ShaisApril 13, 2016 at 6:19 pm - Reply

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

  7. raduApril 26, 2016 at 6:06 pm - Reply

    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!

  8. It does not workSeptember 1, 2016 at 11:54 am - Reply

    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”

    process_usershare_file: stat of /var/lib/samba/usershares/temp failed. Permission denied

    This Ubuntu:
    Ubuntu 16.04.1 LTS

    • Shais
      ShaisSeptember 1, 2016 at 4:57 pm - Reply

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

  9. BillSeptember 6, 2016 at 6:42 pm - Reply

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

  10. MihaiSeptember 19, 2016 at 3:45 pm - Reply

    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 LawNovember 12, 2016 at 2:14 pm - Reply

    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.

    • Shais
      ShaisNovember 12, 2016 at 9:16 pm - Reply

      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 LawNovember 14, 2016 at 4:28 am - Reply

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

  13. Henry LawNovember 14, 2016 at 1:14 pm - Reply

    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

    (without the curly brackets)

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

Leave A Response