How to Connect Two Linux PCs


You can connect two Linux PCs using one crossover cable or two straight cables and a hub or switch. You will have to assign a static IP address to each machine for them to communicate. Linux distributions can have any number of graphical interfaces, but all will use the same commands from the command line.

Things You'll Need

  • 2 straight cables and a hub/switch or router
  • 1 crossover cable


  • Turn the two computers on.

  • Log into Linux.

  • Connect a straight network cable to both computers' network card and to the switch, router or hub. Alternately, connect a single crossover network cable to the computers' network card.


  • Go to the "Application" menu. Click "Accessories," then click on "Terminal" if you are using Gnome.

  • Go to the "Application" menu. Click "System," then click on "Console" if you are using KDE.

  • Go to the Xfce menu. Click "System," then click on "Terminal" if you are using Xfce.


  • Type "su" and press "Enter." Enter your administrator password if you are using a distribution not based on Ubuntu such as Kubuntu, Xubuntu and Linux Mint.

  • Type "sudo" before each command if you are using an Ubuntu derivative.

  • Type "ifconfig eth0" on the first computer.

  • Type "ifconfig eth0" on the second computer.

  • Type "ping" on the first computer to be sure the two Linux PC can communicate.

Tips & Warnings

  • On computers with several network cards, those cards are named eth0, eth1, eth2, etc..
  • You need to have an administrator password to change the IP addresses.

Related Searches


Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!