Ubuntu File Sharing: Setup Samba Server Guide

In Ubuntu system, you can use Samba to set up file sharing. Below are the steps to set up file sharing.

  1. Install the Samba software package by opening the terminal and entering the following command.
sudo apt-get update
sudo apt-get install samba
  1. Create a shared folder:
    Make a folder for sharing files, you can choose to create a folder in the home directory and set sharing permissions.
mkdir ~/share
chmod 777 ~/share
  1. Set up Samba:
    Modify the Samba configuration file to include sharing information.
sudo nano /etc/samba/smb.conf

Please add the following content at the end of the document:

[share]
   comment = Shared Folder
   path = /home/username/share
   browsable = yes
   writable = yes
   guest ok = yes
   read only = no

Replace “username” with your username, then save and exit the editor.

  1. Restart the Samba service by entering the following command in the terminal.
sudo service smbd restart
  1. Create a password for a Samba user: Set up a password for a user in Samba.
sudo smbpasswd -a username

Replace “username” with your user name, input your password and confirm.

You can now access the shared folder on other devices by entering \\your-ubuntu-ip-address\share with the username and password you just set up.

bannerAds