File Sharing on a Local Area Network
In this article several methods of file sharing over the local network (LAN) will be discussed. While it assumes a Raspberry Pi user, the methods are applicable to other computers as well. On all computers connected to a LAN Lt is essential to know that computer’s local IP address. On a Windows box bring up a command prompt with cmd and enter ipconfig. This should show both your local and Internet IP’s. On a Mac go to System Preferences and select Network. On a Linux box, including the Pi itself, open a terminal and enter hostname -I. The local IP will be displayed.
Method 1
All Linux OS’S have python built-in and in most cases it will be python3. Using the command line, navigate to the directory that has the file(s) that you want to transfer. Type **python3 -m http.server. The directory will be served on port 8000 unless you specify another. Knowing the local IP address, on the computer to receive the files, use a web browser and go to IP address:8080. You will see the contents of the directory and download those that you seek. The method works in reverse. You need an http server for your platform. I have one on my Android tablet and can transfer files easily.
Method 2
The RPi software comes with a licensed VNC server. It is activated in the raspi-config app. VNC (Virtual Network Computer) is a remote desktop application. The server has a companion VNC client that is installed on other computers. In use, the client computer connects to the server and the user sees the host computer as if he were sitting in front of it. There are options for file transfer between the two computers. There is no downside to this except that the RPi is the only computer with a free license for the server.
Method 3
Anydesk is a competitor of VNC. It is free for personal use without a license. Its operation is similar except that both the server and client are bundled into a single package. Go to (link) and download the ARM version or install it via pi-apps.
Method 4
As with VNC the raspi-config app includes the option to enable an ssh (secure shell) server. Other computers on the network will need to install the ssh client. On a Linux box simply issue the command sudo apt install openssh-client. Windows and Mac users, please do your own homework. Ssh gives you control of the host computer via the command line. It has numerous options, too many to detail here. Instead here is a (link) with a good tutorial.
Summary:
Which to use? If only a file or two is needed Method 1 is quick and easy. If anything more is to be done, either of the remote desktops will work. Try both. Depending on your equipment one might give better results. In the early models of the RPi, I used ssh quite a bit. The RPi 4 combined with the availability of remote desktops for the ARM processor, this method is most often used by folks who prefer working on the command line.