Access Your Pi's Files From Windows

On this page

Install Samba on a Raspberry Pi

If you use Windows as your main computer, you can make working with your Pi a lot easier if you can access files on your Pi directly from your Windows computer.

To enable that, you first need to install Samba on your Pi:

sudo apt-get install samba samba-common-bin
sudo nano /etc/samba/smb.conf

Changes to make in that smb.conf file:

  • Look for the entry that says workgroup = WORKGROUP and change it if yours is different (the default is WORKGROUP).
  • Also look for the entry that says wins support = no - change "no" to "yes" and uncomment by removing the # sign.
  • And finally under the Share Definitions sections, the first part (under [homes]) has a line with read only = yes. Change that yes to a no.

If you've installed OpenHAB at this point, scroll to the very bottom and add the following section:

comment = OpenHAB
path = /opt/openhab
browseable = Yes
writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
public = no
force user = root

Close and save this file, and set a password (you can use the same password as when logging in as pi):

sudo smbpasswd -a pi

Then reboot your Pi ("sudo reboot").

Test It In Windows

Now you can open a Windows Explorer window ( + E), and navigate to your pi by typing "\\<ip address of your pi>" in the top address bar.

To see the Pi folder, go to "\\<ip address of your pi>\Pi" and connect using username "pi".

Go Back

If you came here from the Introduction Project, click to go back to where you were.

Back to Guides