DEV Community

Cover image for Local Network file sharing using Windows 10 and Ubuntu
KenjiDoom
KenjiDoom

Posted on

Local Network file sharing using Windows 10 and Ubuntu

What is a Windows workgroup?
Windows workgroup is a collection of computers on a local area network (LAN) that share resources and responsibilities. Workgroups provide easy sharing of files, printers, and other network resources. Being a peer-to-peer(P2P) network design, each workgroup computer may both share and access resources if configured to do so. We will be using a Windows workgroup to share folders on a network. These folders will then be accessible using Ubuntu by connecting to the workgroup IP.

  1. Create a folder you would like to share. I'll be creating a folder named shared-folder-kenji in the C: drive. Once created, right-click on the mouse and select Give access to -> Specifc people.
    Access

  2. A pop-up box will appear asking who you would like to share the folder with, and make sure to select everyone
    who?
    Public Network discovery will be turned ON to allow other machines to discover the windows host machine.
    discover
    2
    3

  3. Now, to access this folder on Ubuntu, we will need the local IPv4 address of the Windows machine. To find the IP, we need to open up CMD and type the following command. ipconfig /all
    cmd
    IPv4
    The local IPv4 address of this machine is 192.168.1.144.

  4. Now let's head over to our Ubuntu machine, open up the Files application, select other locations on the left tab. You should see Connect to Server at the bottom of the page. This is where the Windows IP will go. So mine would look something like this. smb://192.168.1.144/
    connect to server
    Once you press enter, another dialog will pop up prompting the windows username and password. Specify both and press enter, BOOM! You should see the shared folder.
    Username and password
    shared

  5. Now once you go inside the main folder there won't be anything, unless of course you moved some files into that folder. But since mine doesn't have anything, let's create python script that prints "Hell World!". First I will create a new folder named shared-folder-kenji-> ubuntu-shared, once inside I will open the terminal by selecting open terminal with the rick-click mouse menu. Once Terminal is open, I'll run the nano command to edit text. Then we'll write out the following, print ("Hell World"), Ctrl+o to save, then Ctrl+x on the keyboard to exit Nano.
    hello world
    You can check if the contents were saved by using the cat command in the terminal. cat hello-world.py, It should look something like this.
    Hello world

  6. Back to our Windows machine, we can see that the hello-world.py file was captured.
    Window machine
    It's a very simple but affective way for sharing folders with lower end Windows and Ubuntu users.

Thanks for reading.
Kenji

Top comments (0)