Ubuntu: How to setup a local network over the CAT5 cable?


  • I use Wifi to connect to the internet, and want to interconnect the two machines I am using so that

    1. it is easy to transfer files

    2. I can copy from one machine and use the same buffer on another machine

  • As both the machines have LAN ports vacant, I can connect the machines using a CAT5 cable.

  • One of the machines runs Windows XP and the other one runs Ubuntu 10.04.

Which free software should I use?


First you will need to assign IP addresses to your eth interface, then you'll need to setup shared folders. Both can be done quite easily:

Assign IP addresses

I will show you how to add a seperate setup only for this connection, so you can switch back to the default behaviour when connecting to the Internet over LAN (if you don't want this, instead of step 2.-6. click edit.. on your eth0/1/... wherever your cable is plugged in.

  1. Rightclick your network-manager (=nm) symbol in your panel, choose edit Connections...
  2. Select eth0/1/... (your interface where the cable is plugged in), klick edit...
  3. Copy your Device MAC Address (eg. 55:55:55:55:55:55)
  4. klick cancel
  5. Click add
  6. Connection name: somethin like direct connection, Device MAC Address: paste the addres you copied in step 3, uncheck connect automatically
  7. Click IPv4 Settings tab
  8. Method: Manual, click Add, Address: (on one Computer, on the other), Netmask: 24, gateway: leave blank, click Apply
  9. Leftclick your nm-symbol, you can now choose your connection (do this on both computers when the cable is plugged in)

To verify your settings, rightclick nm -> Connection Information - and verify your IP address.

Now it should be possible to ping the other computer. Open a terminal, type

ping (or; the ip address of the other computer)

If your output looks like this:

PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=255 time=0.431 ms
64 bytes from icmp_seq=2 ttl=255 time=0.407 ms

Your connection works!

If it looks like this:

ping PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable
From icmp_seq=2 Destination Host Unreachable

something is wrong, sharing won't be posible

Enable shared Folder

Now, to transfer files between computers, at least one computer has to share a folder. We will do this with nautilus:

  1. Rightclick the folder you want to share
  2. Select sharing options
  3. Check "Share this folder"
  4. You might want to allow create/delete files
  5. Check Guest access (be aware that this also opens this folder for people on your WLAN - if you are in a public location you might not want to do that. Instead create a user account or give him your password...)
  6. Click create share
  7. On the other computer (the one that wants to access this share) open nautilus, press Ctrl+l (to open the location bar) and type smb:// (or smb://; the IP address of the computer that opened the share)

Now you should see the share (you might have to give a username/password depending on your decision on step 5).

Please note that creation shares on a NTFS-Partition might not work out of the box!


I assume your router will have ethernet rj45 ports for wired connections. instead of cross connecting your pc, you can easily connect them via the router.

In any caseYou can then set up file sharing under windows and then connect to the windows share via nautilus. or install samba in ubuntu and share a folder with Microsoft windows.

For simple file sharing i would recommend Giver


its easily installed under ubuntu.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »