How to install Samba on Ubuntu 20.04?

Overview

The free open-source tool Samba enables file sharing between computers that are part of the same network. It allows computers running Linux to share data with computers running other operating systems, such as Windows.

This tutorial will show you how to install Samba on Ubuntu 20.04.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • Ubuntu 20.04 equipped system

  • A regular root user with sudo privileges

  • Internet connection

  • Knowledge of Command Line Interface (CLI)

Get Started

Step 1: Installing Samba

  • Update the package registry first:

sudo apt update
  • Then upgrade the necessary packages next:

sudo apt upgrade

When prompted to continue with the upgrade, press 'Y.'

  • After that, install Samba using apt. Include the -y parameter to have any installation-related queries automatically approved:

sudo apt install samba -y

Step 2: Verifying the Installation

  • Check the installation by using:

whereis samba

The directory that houses Samba is printed in the output.

  • The Samba version can also be checked as an additional method of installation verification:

samba -V

The output indicates that Samba version 4.13.17 was installed by the system.

Step 3: Checking the status

  • Finally, make sure Samba is operational by using the following command:

systemctl status smbd

The result confirms the active status of the smbd service.

Conclusion

By following the given tutorial, we were successfully able to configure Samba on our Ubuntu systems and verify the status of Samba so as to confirm the installation.

Last updated