Setup LAN Connection to Connect Between Windows 7 & Ubuntu Systems

In this article, we are going to learn how to setup a LAN connection to connect between two different computers, one having Windows 7 Operating System and another having Ubuntu 12.04 LTS Operating System (debian linux) – by Peer to Peer (P2P) Network. If one machine have 32 bit and another with 64 bit, it won’t be matter as its has been fully tested by me. To make a LAN connection between two computers, its recommended to use a crossover cable as come older Network Interface Cards (NIC) doesn’t support straight cable if two computers are directly connected through it.

What we need

  • Two computers with Windows 7 and Ubuntu 12.04 operating system respectively (or vice-versa)
  • A crossover LAN cable

On computer 1

  1. Go to properties of My Computer (Win+Pause) > Advanced system settings > Computer Name tab.
  2. Press the Change button.
  3. Let’s name it WIN7-PC1, choose Member of to WORKGROUP and press OK and restart computer.

    Computer Name and Workgroup on PC1
    Computer Name and Workgroup on – Windows 7 PC1
  4. Go to Control Panel > Network and Sharing Center > Change Adapter Settings > open properties of the LAN adapter.
  5. Select Internet Protocol Version 4 (TCP/IPv4) > click on Properties > select Use the following IP address
  6. Set IP address: 192.168.0.1, Subnet mask: 255.255.255.0, Default gateway: blank, DNS: blank

    LAN IP Configuration on PC1
    LAN IP Configuration on – Windows 7 PC1
  7. Press OK.

HomeGroup & File and Printer sharing settings

HomeGroup Settings

  1. Open Control Panel > Network and Sharing Center >View your active networks > Note the network profile (below the network name).

    Network and Sharing Center
    Windows 7 – Network and Sharing Center
  2. Open Control Panel > HomeGroup > Change advanced sharing settings… > Choose the network profile.
  3. Select Turn on/off network discovery as required.
  4. Select Turn on file and printer sharing.
  5. Select Turn on sharing so anyone with network access can read and write files in the public folders.
  6. Select Turn on/off password protected sharing as required.
    HomGroup Settings 2
    Windows 7 – HomGroup Settings 2

    HomGroup Settings 1
    Windows 7 – HomGroup Settings 1
  7. Press Save changes button.

File sharing

  1. Open properties of any folder or drive that we want to share > open Sharing tab.
  2. If sharing a folder, click on Share > type Everyone > click Add (Change permission level as required).
  3. Press share > done > close.
  4. If sharing a drive, open its properties > Security tab > Advanced > Changed Permission.
  5. Press Add button > type Everyone on Enter the object name to select > press OK.
  6. Now allow or deny permission as required. Check Allow on Full Control for 777 permission.
  7. Press OK > OK > go to Sharing tab > Advanced Sharing> Share this folder (change permissions as required) > OK > Close.
  8. The shared drive/folder will be visible to opposite computer’s Network.

Printer Sharing

  1. Open Start menu > Device and Printers > Select printer and right click > Printer properties.
  2. Open Sharing tab > check Share this printer > press OK.
  3. The shared printer will be visible to opposite computer’s Network.

On computer 2

  1. To change computer’s name, open Terminal (Alt+CTRL+T) > type sudo gedit /etc/hostname > change the current name to PC2 > Save (CTRL+S) and close the gedit > restart the computer.
  2. Now again open Terminal > type sudo gedit /etc/hosts in the terminal and change the second line as below > save and close.

127.0.0.1              localhost

127.0.0.1              PC2

  1. To change WORKGROUP, open Terminal (Alt+CTRL+T) > type sudo gedit /etc/samba/smb.conf > set worgroup = WROKGROUP under Global Settings.
  2. Go to System Settings > Network > Wired > Options > IPv4 Settings > Method: Manual > press Add button.
  3. Set Address: 192.168.0.2, Netmask: 255.255.255.0, Gateway: blank > press Save…
LAN IP Configuration on Ubuntu 12 PC2
LAN IP Configuration on Ubuntu 12 PC2

File and Printer sharing settings on both computers

File sharing

  1. To share files and directories, we need package Samba installed.
  2. To install Samba, Open Terminal (Alt+CTRL+T) >type sudo apt-get update > hit enter.
  3. Now type sudo apt-get install samba (needs internet else install manually using dpkg command).
  4. To share, right click on any directory that we want to share > Sharing Options > Check Share this folder.
  5. To allow read-write access check Allow others to create and delete… option.
  6. To allow guest access check Guest access option.
  7. Press Create Share button.
  8. The shared folder will be visible to opposite computer’s Files > Browse Network.

Printer Sharing

  1. Open System Settings > Printers > right click on the printer > check Shared.

Please check the parent article for more information on computer networking: http://w3epic.com/connect-win-xp-win-7-win-8-server-2008-ubuntu-with-each-others

Need help, just leave a comment – I’ll be back to you.

Thanks.

3 Replies to “Setup LAN Connection to Connect Between Windows 7 & Ubuntu Systems”

Leave a Reply

Your email address will not be published. Required fields are marked *