How do I connect my desktop and my laptop using an ethernet cable to transfer files?

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:

smb://192.168.1.2/folder/

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.


A direct connection between any two computers is perfectly possible with a cross cable hooked up to both of them and can be bought at any store that sells network cables. If one of the two computers is more modern, you don't even need such a cross cable and any network cable will do.

Hardware config:

Have a look at this AskUbuntu Q&A how to set up a static IP address and set one computer to use 192.168.1.1/24 and the other to 192.168.1.2/24

Plug this cable into the Ethernet ports of both computers.

Software:

The easiest way to transfer files between computers is NitroShare as it doesn't need any infrastructure and is easy to install&use and is blindingly fast. It also runs on everything: Ubuntu, Windows, ...

To install NitroShare, use the following steps:

sudo add-apt-repository ppa:george-edison55/nitroshare-dev
sudo apt-get update
sudo apt-get install nitroshare

A small icon now shows up in the menu bar:

Nitroshare Menu bar Icon

(do these steps on both computers)

On one computer, click the NitroShare icon and click "Send Directory" and (assuming you want to send your user's data) send Documents, Pictures, ... over one by one.

Warning! Do not send the entire /home directory as that will copy your configuration files as well!


Most Gigabit Ethernet (10/100/1000BaseT) adapters have auto MDI/MDIX function. Therefore, if you have it installed in one computer, you can connect it with other computer using a standard Ethernet cable - its a hardware issue not a software issue.

Most modern PC's that have a gigabit ethernet port has this capability - just plug in both PC's - if they talk to each other then at least one computer has one of these ports.

Older PC's you will not be able to do this - you'll need a cross-over cable.

However, its quite easy to create one from a straight cable if you dont want to purchase one specifically.

A Crossover cable is an Ethernet cable (Cat 5, Cat 5e or Cat 6) that has pins 1, 2, 3, 6 on one end crossed to pins 3, 6, 1, 2 on the other end respectively.

Therefore if you are handy with a wire-stripper you can cross-over the correct wires.

Tags:

Networking