Common ways for two separate laptops running Linux to transfer files?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There are several ways:
1: A modified traditional technique using "sneakernet". A USB device you carry files from one to the other.
2: SFTP should work between them over WIFI, or you can run a Cat-5 jumper between Ether ports and put them on a private network for direct wired transfer using SFTP.
3: If you have many files, in particular if they are organized in folders, you can use RSYNC over WiFi or a direct wired network. Advantage, it can be restarted and it can efficiently transfer whole folders of files.
There are multiple other ways, but most are either insecure (ftp, rcp, etc) or fragile (anything that involve remote mounting of storage using NFS or CIFS) and can cause "issues" you will want to avoid.
NFS is the linux native method of sharing files between computers. Files can be transferred in either direction from any computer with NFS properly configured. It doesn't matter whether the network connection is wired or wireless. With appropriate configuration, files on NFS mounts can be transparently used as if they were on local storage. All filesharing here is via NFS.
NFS is the linux native method of sharing files between computers. Files can be transferred in either direction from any computer with NFS properly configured. It doesn't matter whether the network connection is wired or wireless. With appropriate configuration, files on NFS mounts can be transparently used as if they were on local storage. All filesharing here is via NFS.
This is wrong. NFS is not a way to transfer files (although it CAN be subverted for that purpose) it is a way to share storage. Shared storage is different than transferring files. Shared storage exists physically in one place, but can be used form more than one. Transferred files physically exist in more than one place. That difference can be critical.
Syncthing is the best option to sync files between two (or more) computers in my opinion. Once you set it up all you need is to have both systems powered on at the same time and the data gets copied across without any fuss. I am using it to sync files between my 2 Linux systems, 1 Windows machine and android phone seamlessly.
Both laptops are mine and both laptops are accessing the Internet with the same Wifi
For just the occasional copies of one or two files, I'd just use SSH - you need to have the openssh package installed on both computers, and one of them (the server) has to be running the sshd service.
For an easier arrangement ongoing, and easier for transferring multiple files/directories, I suggest Filezilla. You can save the connections so that you can just use them as and when.
Nitroshare is simple too, but I've personally found it to be a bit flaky.
Linux now supports many "network file systems," but NFS is the most commonly used protocol for Linux-to-Linux storage sharing. Also note that there are several versions of this protocol. Use the most recent one. (Microsoft Windows®, of course, also has full support for it.)
NFS is very straightforward to set up and works very well. When a client insisted that I use "multiple virtual machines" instead of "containers" on a recent project, I had to use NFS shares to connect the other VMs to the one that hosted the files. But it worked extremely well and the resulting (several hundred) web sites as fast as any. It was trivial to add a new machine to the [virtual ...] network.
For any shares that need to run across a public network, such as the Internet, simply "tunnel" the connections through a VPN such as OpenVPN – properly secured, of course, by unique digital certificates. (Never "PSKs = passwords.") VPN secures the connection and guarantees who you are actually talking to, while NFS provides the sharing.
Last edited by sundialsvcs; 01-23-2023 at 09:46 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.