network shared folder on raspberry pi

One of the really great things about the Raspberry Pi is that it is a Linux based computer, so pretty much anything you can do with a linux computer you can do with a Pi – within reason!

I have previously written a post about being able to remotely access the Raspberry Pi via SSH , in this post I’ll provide instructions on how to create a network shared folder on raspberry pi,  so you can easily move files back and forth to Pi to a Windows 8 computer or ubuntu desktop.

For this post I will assume you already have connected your Pi via SSH, however you can still following along even if you haven’t as all we really need is command line access to the Pi.

Getting set up

To enable network sharing on the Pi well need to install a service called Samba.

What is Samba

“Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients.” Samba is freely available, unlike other SMB/CIFS implementations, and allows for interoperability between Linux/Unix servers and Windows-based clients.

Essentially Samba is a little bit of open source goodness that enables linux and windows computers talk to each other.

Install Samba
Installing Samba is fairly trivial task and involves you only running 3 commands in the terminal window on your Raspberry Pi.

After we’ve installed samba on our pi, we need to carry out 2 configuration steps. Firstly, we need to create a folder we want to share and secondly we’ll need to  configure samba to actually share the folder.

Create folder to share

Creating a folder to share is really easy, we’ll just create a folder and call it public. 

*** Warning : We are going to create a very permissive share folder on our pi. So if security is a concern, then you may want to read up about the security considerations on linux.  This how to primarily about creating a share to enable easy access to your Pi over a network ***

Configure Samba

We now need to edit the samba configuration file, so we’ll open the file in nano

We need to edit this file in a few locations.

Firstly, because we are going to access the Pi from a Windows 8 computer, we’ll need to change


We need to enable WINS support, so  Change


Next, we want to enable user security. Remove the hash tag (#) so the entry looks like this:

To enhance the network performance, do the same with TCP_NODELAY

Then we need to create a new share folder information

We now need to exit out of nano so Ctrl + X and save it.

We’ll run a check on the config file to ensure we haven’t broken anything

We should see something like this

We now need to restart the Samba service in order for it to pick up the new configuration changes

Your Pi should now be sharing files on the network!

You should now be able to access your Raspberry Pi shared folder from you windows machine by open files & folders and navigating to \\raspberrypi

windows shared on raspberry pi

Double clicking on the public folder you may be prompted for a username and password . The default username is pi and the default password is raspberry


Once you’ve entered these you are into the shared folder and you can now add, remove and update files as you wish.

To Access the same folder from a Ubuntu machine  simply open files and folders and click on Connect to Server and enter the same credentials  as above, but use the IP address of the Pi

ubuntu share

A reminder again that this is a very permissive share and I would strongly advise against leaving it this open, if you plan to connect the Pi to the internet or you’re going to store any particularly sensitive information.



Gary Woodfine

Freelance Full Stack Developer at
Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

Affiliate Disclaimer

Disclosure: Please note that some of the links included in the blog posts are affiliate links, which means I will earn a commission if you decide to make a purchase.

I only include affiliate links to products, services and companies that I have personal experience and have actually used. I only recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.

Please do not spend any money on these products unless you feel they are relevant, suitable and will help you achieve your goals.

Buying anyone of these products and the commisions earned will not make me an overnite multi millionaire, but they will help to cover the hosting costs and compensate for the countless hours and effort I put in to create meaningful and valuable free content I provide to help others succeed.

You've also undoubtedly noticed that I also use various advertising networks - unless of of course you're using an Ad blocker, this is also an attempt to reduce my monthly deficit I experience in providing free relevant, valuable and on occassion insightful content for the benefit of others.

I only really make some money if people click on the ads, unless of course you consider 1c per 1000 impressions real money!

Bear in mind just how many impressions I need to make before I can cover my £20 hosting costs a month!

If you are using an adblocker and guilt stricken you can of course donate using any of the buttons below, but I won't be holding my breath.

Buy me a coffeeBuy me a coffee