Skip to content

Raspberry Pi

My Adventures w/ a Raspberry Pi

Getting started…I am a Windows guy. I have been for my entire career, or at least most of it. The downside is that I let my Unix skills rust over and I need to re-learn a bunch of stuff. My first task…

Tools to Learn

Putty, NPM, Sudo, SSH

Accessing Files on Your Raspberry Pi from Windows

I hate editing files directly on my Raspberry Pi. Sometimes I just want to sit on my Windows box and edit files there.

I need a shared folder on my Pi so that I can edit files on the Pi from my Windows machine. Enter Samba. Samba allows you to easily create shared on the Pi. I read a few blogs on this, but found DaedTech to be exactly what I was looking for. A quick and dirty tutorial from a nix guy for a windas guy.

So first things first…here is the article, link below. It’s perfect.

https://daedtech.com/create-a-windows-share-on-your-raspberry-pi/

-Erik Dietrich

Now second…I am stealing Erik’s content for one reason and one reason only. I fear, he’ll take his site down and if I have to repeat these steps, I won’t remember. So down below…is a summary of his instructions for my own use…YOU…need to click on the link above and give Erik some traffic before you read any of my content.

  1. SSH into your Raspberry Pi and type “sudo apt-get install samba” which will install samba.
  2. Next do a “sudo apt-get install samba-common-bin” to install a series of utilities and add-ons to the basic Samba offering that are going to make working with it way easier as you use it.
  3. Now, type “sudo nano /etc/samba/smb.conf” to edit, with elevated permissions, the newly installed samba configuration file.
  4. Navigate to the line in the samba configuration file with the heading “[homes]”.
  5. Add a new section above the “[homes]” section, to create a share called “pi”.
[pi]
path=/home/pi
read only = no
writeable = yes
browseable = yes
guest ok = yes
create mask = 0755
directory mask = 0755

You should now be able to navigate TO your share ON the PI FROM your WINDOWS box, using a standard UNC path \\<<ip address of pi>>\<<sharename>>. You should be able to browse files and folders in the share.

As Erik mentions, in these instructions we are using MASSIVELY WIDE OPEN SECURITY. If this were a production machine on a network…I WOULD NEVER DO THIS, but this is just my Raspberry Pi sandbox, so I don’t care.

When followed all of Erik’s steps, everything worked perfectly until I wanted to edit a file in a subfolder of a subfolder of user directory. I fixed that by taking the MASSIVELY WIDE OPEN SECURITY setup and I instead made it a TOTALLY WIDE OPEN SECURITY. If this were a production machine on a network…I WOULD NEVER EVER DO THIS, but this is just my Raspberry Pi sandbox, so I don’t care.

I made these changes using the following command: sudo chmod -R 777 /home/pi/

Notes

  • Installed VS Code, so I have a standard environment to work in. My plan is to code on my Surface, but deploy to my MM for testing.
  • Started working on my own Hello World project using VS code, then realized there is a template project
  • Installed Git for Windows so I can grab the template project

Leave a Reply