0

I try to make an ethernet network of 2 Computers, both with Ubuntu. I am using cross cable. I tried to connect them as shown here. How to network two Ubuntu computers using ethernet (without a router)? When I open Browse Network folder(to share files) on both computers, the computers are not shown. Ping shows 64 bytes from 10.0.0.2: icmp_seq=1 ttl=128 time=0.457 ms multiple entrys(doesnt stop) System monitor on the first showed a transmission of 600MB, on the other one some kb in up and download.

  • If ping works (try `ping -c 3 10.0.0.1` to limit the ping count) then you can transfer files like this: On PC#1 do `nc -l 4321 >filename` & on PC#2 do `cat filename | nc 10.0.0.1 4321`. This establishes that the mechanics are there, and shares files - we can make it work nicely when we're sure. – Mark Williams Dec 09 '14 at 14:14
  • possible duplicate of [How to network two Ubuntu computers using ethernet (without a router)?](http://askubuntu.com/questions/22835/how-to-network-two-ubuntu-computers-using-ethernet-without-a-router) – Xen2050 Dec 09 '14 at 14:14
  • nc -l 4321 >filename, is there a way to share folders? – Foto Bobotic Dec 09 '14 at 18:17
  • possible duplicate of [Transferring files from Ubuntu PC to Ubuntu laptop](http://askubuntu.com/questions/580486/transferring-files-from-ubuntu-pc-to-ubuntu-laptop) – Fabby Feb 24 '15 at 06:49

1 Answers1

1

A way to share folders

In each of the computers:

Open a terminal,

Press Ctrl+Alt+T

And install Samba running:

sudo -i
apt-get update
apt-get install samba samba-common samba-common-bin samba-vfs-modules smbclient

Set a password for each user in Samba

 sudo -i
 smbpasswd -a <user_one>
 smbpasswd -a <user_two>

Create a directory to be shared, suppose /home/user/Share

  sudo -i
  mkdir /home/<user_name>/Share

Edit the file /etc/samba/smb.conf

  sudo -i
  nano//etc/samba/smb.conf

In the open file, add this to the very end of the file:

[Share]
path = /home/<user_name>/Share
available = yes
valid users = <user_one>, <user_two>
read only = no
browseable = yes
public = yes
writable = yes 

Ctrl + O, save file. Ctrl + X, close nano.

To access the network share use:

your username and password through the path:

smb://<HOST_IP>/home/<user_name>/Share 
kyodake
  • 15,052
  • 3
  • 40
  • 48