How To Install smbclient on Ubuntu 20.04

In this tutorial we learn how to install smbclient on Ubuntu 20.04. smbclient is command-line SMB/CIFS clients for Unix command-line SMB/CIFS clients for Unix command-line SMB/CIFS clients for Unix

Introduction

In this tutorial we learn how to install smbclient on Ubuntu 20.04.

What is smbclient

smbclient 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.

This package contains command-line utilities for accessing Microsoft Windows and Samba servers, including smbclient, smbtar, and smbspool. Utilities for mounting shares locally are found in the package cifs-utils. Task: samba-server, kubuntu-desktop, kubuntu-full, ubuntu-mate-core, ubuntu-mate-desktop

Package: smbclient Architecture: amd64 Version: 2:4.11.6+dfsg-0ubuntu1.8 Priority: optional Section: net Source: samba Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Samba Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1814 Provides: samba-client Pre-Depends: dpkg (>= 1.15.6~) Depends: samba-common (= 2:4.11.6+dfsg-0ubuntu1.8), samba-libs (= 2:4.11.6+dfsg-0ubuntu1.8), libarchive13 (>= 3.0.4), libbsd0 (>= 0.0), libc6 (>= 2.14), libgnutls30 (>= 3.6.5), libpopt0 (>= 1.14), libreadline8 (>= 6.0), libsmbclient (>= 2:4.0.3+dfsg1), libtalloc2 (>= 2.2.0~), libtevent0 (>= 0.10.0~), libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.8) Suggests: cifs-utils, heimdal-clients Filename: pool/main/s/samba/smbclient_4.11.6+dfsg-0ubuntu1.8_amd64.deb Size: 363720 MD5sum: 843c1195cd65c6adb15bb230180da78f SHA1: 01f74fd990149e4cefb56487ad21cdd58b1b0940 SHA256: c3a7cd3ac5dd95a8902328912e6e03945aa1b4bca08bb78a6b57907bc906a555 SHA512: f209d92fff4059a0410005a3bc440f8e948f7389373a32963a6ee0918cdad37fdd984504bf312bbb2b7068b42182601c983fc731978dacc612acd99c727f1687 Homepage: http://www.samba.org Description-en: command-line SMB/CIFS clients 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.

This package contains command-line utilities for accessing Microsoft Windows and Samba servers, including smbclient, smbtar, and smbspool. Utilities for mounting shares locally are found in the package cifs-utils. Task: samba-server, kubuntu-desktop, kubuntu-full, ubuntu-mate-core, ubuntu-mate-desktop

Package: smbclient Architecture: amd64 Version: 2:4.11.6+dfsg-0ubuntu1 Priority: optional Section: net Source: samba Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Samba Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1812 Provides: samba-client Pre-Depends: dpkg (>= 1.15.6~) Depends: samba-common (= 2:4.11.6+dfsg-0ubuntu1), samba-libs (= 2:4.11.6+dfsg-0ubuntu1), libarchive13 (>= 3.0.4), libbsd0 (>= 0.0), libc6 (>= 2.14), libgnutls30 (>= 3.6.5), libpopt0 (>= 1.14), libreadline8 (>= 6.0), libsmbclient (>= 2:4.0.3+dfsg1), libtalloc2 (>= 2.2.0~), libtevent0 (>= 0.10.0~), libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1) Suggests: cifs-utils, heimdal-clients Filename: pool/main/s/samba/smbclient_4.11.6+dfsg-0ubuntu1_amd64.deb Size: 366704 MD5sum: b0ab914184ceb851a91d078771f8e47c SHA1: dfa4a94682cb81c33dccc340e485a5e5be7e1508 SHA256: a5ee14dcf958047c6b6f12253de494727fd0aeb62fc058997ebfa16780e8fb5d Homepage: http://www.samba.org Description-en: command-line SMB/CIFS clients 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.

This package contains command-line utilities for accessing Microsoft Windows and Samba servers, including smbclient, smbtar, and smbspool. Utilities for mounting shares locally are found in the package cifs-utils. Task: samba-server, kubuntu-desktop, kubuntu-full, ubuntu-mate-core, ubuntu-mate-desktop

There are three methods to install smbclient 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 smbclient Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install smbclient using apt-get by running the following command:

sudo apt-get -y install smbclient

Install smbclient Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install smbclient using apt by running the following command:

sudo apt -y install smbclient

Install smbclient 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 smbclient using aptitude by running the following command:

sudo aptitude -y install smbclient

How To Uninstall smbclient on Ubuntu 20.04

To uninstall only the smbclient package we can use the following command:

sudo apt-get remove smbclient

Uninstall smbclient And Its Dependencies

To uninstall smbclient and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove smbclient

Remove smbclient Configurations and Data

To remove smbclient configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge smbclient

Remove smbclient configuration, data, and all of its dependencies

We can use the following command to remove smbclient configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge smbclient

References

Summary

In this tutorial we learn how to install smbclient package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.