Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Transferring Files from a Windows PC to Raspberry Pi- (Part 5/12)

By Prabakaran P.M May 23, 2021

This article is to make the process of transferring files from a Windows PC to Raspberry Pi easier. The Raspberry Pi is connected to a Windows PC through Ethernet cable and the GUI is obtained using a VNC server. Sharing files between Raspberry Pi and Windows is often very useful for Raspberry Pi users. Whether we need to transfer media files to the Raspberry Pi or want to share some software packages. This article discusses how to enable file sharing for a folder on the Raspberry Pi running the Raspbian OS.

Microsoft developed the protocol called Common Internet File System (CIFS) for transfer of files between windows machines. The most popular implementation of CIFS in LINUX system is known as Samba and it allows Raspberry Pi to act as a CIFS file server, which allows a Windows PC to mount a folder on a Raspberry Pi and then allowing to modify(copy, delete, read and write) the files on it.


In this project the Raspberrypi board is booted with the Ubuntu OS and is connected to the Ethernet port of a Windows7 PC. The board is connected to the internet connection as explained in the project Connecting the Raspberrypi to the internet. The IP address of the Raspberrypi board has been obtained to remote login in the TUI using the PUTTY and is remotely accessed using VNC.

First step in this process is to install the samba software which is capable of providing support for the Windows naming service (WINS), and support for linking Raspberry Pi to Windows by adding it to the Workgroup. A Workgroup is a cluster of computers on a local network that can access each other’s folders. Installing this software is very simple and is discussed in the following.

Open the command terminal and type the following command:

apt-get install samba samba-common-bin

If not logged as the root user, add the sudo before the command like:

sudo apt-get install samba samba-common-bin

Once the Linux finds the files to be downloaded it will prompt for permission to proceed. Around 35 Mb is required to download all the required files and so make sure that the SDcard has enough available free space.

Installing Samba Software for support WINS and Raspberry pi

Fig. 1: Installing Samba Software For Support WINS And Raspberry Pi

Type ‘y’ and press Enter to proceed.

That will install the software in the local disk which is SD card here.

After installation, configure the software by opening the file /etc/samba/smb.conf using the command:

sudo nano /etc/samba/smb.conf

Set up the entries for workgroup and wins support as follows:

workgroup = your_workgroup_name

wins support = yes

Workgroup name can be anything, and it should matches the name of the Workgroup that you want to join.

Scroll down config file until you see a section called Share Definitions, and place this code there. The path should point to the drive or folder that you want to share. Setting guest to no will prompt for a password to access the shared folder.

[pihome]

comment= Pi Home

path=/home/pi

browseable=Yes

writeable=Yes

only guest=no

create mask=0777

directory mask=0777

public=no

Configuring Samba Software for Raspberry Pi

Fig. 2: Configuring Samba Software for Raspberry Pi

Press “Ctrl + X” to leave the nano editor and type “Y” to confirm saving the file. Press ENTER to keep the filename unchanged(i.e. /etc/samba/smb.conf).

Now, we should restart the software so that samba reads the configuration file and acts as we mentioned. To restart type the below command:

sudo service samba restart

There is one last step before you can access the shared folders. A password needs to be defined since CIFS is used to access files on the Raspberry Pi. To set the password for the default pi user, type:

sudo smbpasswd –a pi

The above command will add the user pi to the Samba users and ask for a password. You need to repeat this step for any other users you want to add.

Connect from Windows:

In windows machine, Go to the My computer > Network’s > network. The window where all the network available devices are displayed will be opened up which includes RASPBERRYPI in it.

Connecting RaspberryPi To Window

Fig. 3: Connecting RaspberryPi To Window

Double click on it > it will prompt for login > Use pi as user name and password which we set in the previous step. Now you can see folders which are shared from raspberry Pi.

Mapping Drive for Windows & Raspberry Pi Connection

Fig. 4: Mapping Drive For Windows & Raspberry Pi Connection

Right click on the folder and select ‘Map network drive’.

Click on finish in the window.

Now do the same steps with the other folders. Once all the steps are completed, you can see the folders in your computer.

Shared Folders in Windows & Raspberry Pi Interface

Fig. 5: Shared Folders In Windows & Raspberry Pi Interface

Note: Each time you restart your PC it will prompt you for logging in. If you do not want to deal with logging in you can also make the share publicly available by changing the config file to say:

public=yes

Please note that this is not recommended, since anyone can access, modify and delete your files.

You may also like:


  • What is the LoRaWAN network and how does it work?

  • What are the top development boards for AI and ML?

  • What are LoRa gateways and what types are available?

  • What are the top tools for developing embedded software?

  • What are the top open-source software systems for home automation?

  • What is MicroPython?

Filed Under: Raspberry pi, Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • How to improve the reliability of RS485 communication?
  • The Analog Gods Hate Me
  • Battery Deep Discharge – IC Workarounds?
  • Safe Current and Power Density Limits in PCB Copper(in A/m² and W/m³) simulation
  • Why so few Phase shift full bridge controllers?

RSS Electro-Tech-Online.com Discussions

  • Simple LED Analog Clock Idea
  • The Analog Gods Hate Me
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz
  • PIC KIT 3 not able to program dsPIC
  • Parts required for a personal project

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • Tria modules integrate edge AI processing with multi-core processors
  • pSemi introduces RF switch with 52 dBm PMAX,PEAK and 90-dBm IIP3 linearity
  • XP Power launches 1.3 kW power supply with 58.9 W/cm³ density
  • How to enable Wi-Fi provisioning in ESP32-based IoT products
  • Amphenol RF introduces FAKRA to SMA adapters with 4 GHz operating frequency

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe