How to Connect Two Linux PCs

Save

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

Preparation

  • 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.

Terminal

  • 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.

Command

  • 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 192.168.1.1" on the first computer.

  • Type "ifconfig eth0 192.168.1.2" on the second computer.

  • Type "ping 192.168.1.2" 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.

References

Promoted By Zergnet

Comments

You May Also Like

Related Searches

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