How To Install samba on Ubuntu 20.04
Introduction
In this tutorial we learn how to install samba
on Ubuntu 20.04.
What is samba
samba is:
Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as an NT4-style domain controller, and can integrate with both NT4 domains and Active Directory realms as a member server.
This package provides the components necessary to use Samba as a stand-alone file and print server or as an NT4 or Active Directory domain controller. For use in an NT4 domain or Active Directory realm, you will also need the winbind package.
This package is not required for connecting to existing SMB/CIFS servers (see smbclient) or for mounting remote filesystems (see cifs-utils). Task: samba-server
Package: samba Architecture: amd64 Version: 2:4.11.6+dfsg-0ubuntu1.8 Priority: optional Section: net Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Samba Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 16259 Pre-Depends: dpkg (>= 1.15.6~), init-system-helpers (>= 1.54~) Depends: adduser, libpam-modules, libpam-runtime (>= 1.0.1-11), lsb-base (>= 4.1+Debian), procps, python3 (« 3.9), python3-dnspython, python3-samba, samba-common (= 2:4.11.6+dfsg-0ubuntu1.8), samba-common-bin (= 2:4.11.6+dfsg-0ubuntu1.8), tdb-tools, python3 (>= 3.8~), python3:any, libbsd0 (>= 0.6.0), libc6 (>= 2.14), libgnutls30 (>= 3.6.12), libldb2 (>= 2:2.0.10~), libpopt0 (>= 1.14), libpython3.8 (>= 3.8.2), libtalloc2 (>= 2.2.0~), libtasn1-6 (>= 4.14), libtdb1 (>= 1.4.2~), libtevent0 (>= 0.10.0~), libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.8), samba-libs (= 2:4.11.6+dfsg-0ubuntu1.8) Recommends: attr, logrotate, python3-markdown, samba-dsdb-modules, samba-vfs-modules Suggests: bind9 (>= 1:9.5.1), bind9utils, ctdb, ldb-tools, ntp | chrony (>= 3.0-1), smbldap-tools, ufw, winbind Enhances: bind9, ntp Filename: pool/main/s/samba/samba_4.11.6+dfsg-0ubuntu1.8_amd64.deb Size: 971304 MD5sum: 358eb7c2b88080e4e8637da0f2857d7f SHA1: 5638a2271475e774646dbc71eea27bb4a069dff2 SHA256: ed7a1d80529320fa58869f7e6baebf9e54116ba032c8f27fb095ce43781c524b SHA512: 53faf66a60ca98e8f081025cd6767afe3b8ef9d242e33bd9c66ad4ed80b517d2e7a6a0defb8d26c494fbd3bd883311d0cb2f89406c858b42dc6bef7b4ec66129 Homepage: http://www.samba.org Description-en: SMB/CIFS file, print, and login server for Unix Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as an NT4-style domain controller, and can integrate with both NT4 domains and Active Directory realms as a member server.
This package provides the components necessary to use Samba as a stand-alone file and print server or as an NT4 or Active Directory domain controller. For use in an NT4 domain or Active Directory realm, you will also need the winbind package.
This package is not required for connecting to existing SMB/CIFS servers (see smbclient) or for mounting remote filesystems (see cifs-utils). Task: samba-server
Package: samba Architecture: amd64 Version: 2:4.11.6+dfsg-0ubuntu1 Priority: optional Section: net Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Samba Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 16257 Pre-Depends: dpkg (>= 1.15.6~), init-system-helpers (>= 1.54~) Depends: adduser, libpam-modules, libpam-runtime (>= 1.0.1-11), lsb-base (>= 4.1+Debian), procps, python3 (« 3.9), python3-dnspython, python3-samba, samba-common (= 2:4.11.6+dfsg-0ubuntu1), samba-common-bin (= 2:4.11.6+dfsg-0ubuntu1), tdb-tools, python3 (>= 3.8~), python3:any, libbsd0 (>= 0.6.0), libc6 (>= 2.14), libgnutls30 (>= 3.6.5), libldb2 (>= 2:2.0.8~), libpopt0 (>= 1.14), libpython3.8 (>= 3.8.2), libtalloc2 (>= 2.2.0~), libtasn1-6 (>= 4.14), libtdb1 (>= 1.4.2~), libtevent0 (>= 0.10.0~), libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1), samba-libs (= 2:4.11.6+dfsg-0ubuntu1) Recommends: attr, logrotate, python3-markdown, samba-dsdb-modules, samba-vfs-modules Suggests: bind9 (>= 1:9.5.1), bind9utils, ctdb, ldb-tools, ntp | chrony (>= 3.0-1), smbldap-tools, ufw, winbind Enhances: bind9, ntp Filename: pool/main/s/samba/samba_4.11.6+dfsg-0ubuntu1_amd64.deb Size: 971172 MD5sum: b8d24bbf56f957bd051a7f290d875c5a SHA1: 13a7dfd5a70ba29700e720e3a6fb74aa933a8249 SHA256: f673d5512f6467634f5c4122f05d2fbc1d2300deee86ec86dbfd90b650278b64 Homepage: http://www.samba.org Description-en: SMB/CIFS file, print, and login server for Unix Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as an NT4-style domain controller, and can integrate with both NT4 domains and Active Directory realms as a member server.
This package provides the components necessary to use Samba as a stand-alone file and print server or as an NT4 or Active Directory domain controller. For use in an NT4 domain or Active Directory realm, you will also need the winbind package.
This package is not required for connecting to existing SMB/CIFS servers (see smbclient) or for mounting remote filesystems (see cifs-utils). Task: samba-server
There are three methods to install samba
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install samba Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install samba
using apt-get
by running the following command:
sudo apt-get -y install samba
Install samba Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install samba
using apt
by running the following command:
sudo apt -y install samba
Install samba Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install samba
using aptitude
by running the following command:
sudo aptitude -y install samba
How To Uninstall samba on Ubuntu 20.04
To uninstall only the samba
package we can use the following command:
sudo apt-get remove samba
Uninstall samba And Its Dependencies
To uninstall samba
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove samba
Remove samba Configurations and Data
To remove samba
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge samba
Remove samba configuration, data, and all of its dependencies
We can use the following command to remove samba
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge samba
References
Summary
In this tutorial we learn how to install samba
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.