How to set up a file server on Ubuntu?

by aliya.yundt , in category: Networking & Wireless , a year ago

How to set up a file server on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by viola_gleichner , a year ago


Setting up a file server on Ubuntu can be done by following these steps:

  1. Install Ubuntu Server: Download and install the latest version of Ubuntu Server on the computer or virtual machine that will serve as the file server.
  2. Install Samba: Samba is an open-source software suite that allows file sharing between different operating systems. To install it, run the following command in the terminal:
sudo apt-get update
sudo apt-get install samba

  1. Create a shared folder: Create a folder that will be shared by the file server. For example, you can create a folder named "shared" in the /srv directory:
sudo mkdir /srv/shared
sudo chmod 777 /srv/shared

  1. Configure Samba: Open the Samba configuration file by running the following command:
sudo nano /etc/samba/smb.conf

Add the following lines to the end of the file:

path = /srv/shared
read only = no
browsable = yes
guest ok = yes

Save the file and exit.

  1. Restart Samba: Restart the Samba service for the changes to take effect:
sudo systemctl restart smbd

  1. Access the shared folder: The file server is now ready to use. You can access the shared folder from any computer on the network by using the server's IP address and the shared folder name. For example, if the server's IP address is, you can access the shared folder by typing the following into the file explorer's address bar:

You will be prompted for a username and password. You can either use the server's root credentials or create a new user specifically for file sharing.