1 installation
sudo apt-get install Samba
2 configuration
Open the Samba configuration file:
Vim/etc/samba/smb.conf
At the end of its add:
[Share]
Path =/home/liyihai/share
Available = yes
browseable = yes
Public = yes
writable = yes
3 Creating a shared directory
mkdir ~/share
chmod 777 ~/share
4 Creating a Samba user
sudo touch/etc/samba/smbpasswd
sudo smbpasswd-a Liyihai
Enter the user's password as prompted (required when logging in to the Samba shared directory).
5 Restarting Samba
Sudo/etc/init.d/samba restart
6 Testing
Select Connect to Server in the network at the bottom of Ubuntu files, then drill down into the Smb://ip_addr/share (ip_addr as your computer's IP address) in the pop-up dialog, then click the Connect button in the lower right corner . You are prompted for the password (created in step 4th), and you enter the password to enter the shared directory.
Ubuntu14.04 installation of Ubantu system samba for file sharing