In order to establish a connection between the two machines using an Ethernet cable, both machines need a static IP of which are on the same IP Subnet.
1. Grab an ethernet cable, and attach it to the primary machine's ethernet port, take the other side of the cable and plug it into the secondary machine's ethernet port.
2. Identify your ethernet interfaces on each computer, it should be either eth0 or something like enp3s0. Take note of those interface names because we're going to need them later. You can do this by simply entering, sudo ifconfig
3. On the primary machine... run this command in your terminal/command line: sudo ifconfig eth0 10.0.0.1
(replace eth0 with the primary machine's ethernet interface.)
4. On the secondary machine... run this command in its terminal/command line: sudo ifconfig eth0 10.0.0.2
(replace eth0 with the second machine's ethernet interface.)
5. Now... The two computers should be able to communicate with each other. You can test this by entering the command, on your primary machine, ping 10.0.0.2 -c 2
... If you see "64 bytes from 10.0.0.2..." then the communication is working.
6. Connect to the secondary machine (IP Address: 10.0.0.2) using your FTP client... I'm assuming that you have already set up the FTP server on your secondary machine.
If these steps are unsuccessful please be sure to reply to me. The amazing part about this is the ability to configure a DHCP server to automatically assign an IP address to your secondary machine, but this is complicated.
On the Linux machine run this command:
sudo ifconfig address 169.254.5.1 netmask 255.255.0.0
On the windows machine, you will need to run a command prompt as Administrator and run this command:
netsh interface ip set address name="Local Area Connection" static 169.254.5.2 255.255.0.0 169.254.5.1 1
You can replace the 169.254.*.* with whatever almost address you want, although it is highly recommended to stay in the 169.254.*.* block.
Keep in mind that Windows will always say Unknown Network for an ad-hoc connection like this. The only way to get around it is to buy a router or a switch. If you want to enable Homegroup, then you'll need to change your network location (multiple ways to do so in Windows, covered here) to private/Home.
Best Answer
Of course you can! Connect them with the cable, set IP addresses for each machine, for example 192.168.1.1 for your desktop and 192.168.1.2 for your notebook. Don't forget to disable/enable the connection after you set the addresses, as it may be necessary for them to become active.
Then, on one of your machines, possibly the source of the data, right click the folder you want to share, go to "Share" and enable sharing. Samba is required for this and you will be asked whether you want to install it when enabling sharing, otherwise, if it's already installed, it will just work right away. Remember to set an easy sharing name, something short and without spaces.
Now, go to the other machine, open nautilus (or any other file manager thereof) and go to location:
Where:
192.168.1.2 is the IP of the source machine where the folder is being shared.
folder is the folder name you set when enabling the sharing.
In nautilus, you can go to this location by clicking CTRL + L and writing it to the address bar.