net command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
net: command not found
or when using sudo you get the following error message
sudo: net: command not found
Solutions to net: command not found
How To Fix net: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu net is provided by samba-common-bin package.
samba-common-bin is:
Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as a domain controller or member server in both NT4-style and Active Directory domains.
This package contains the common files that are used by both the server (provided in the samba package) and the client (provided in the samba-clients package).
To fix this problem, we can install more using the command below.
sudo apt-get -y install samba-common-bin
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install samba-common-bin.
sudo apt -y install samba-common-bin
Or if you have aptitude installed you can use the following command.
sudo aptitude install samba-common-bin
Summary
In this tutorial we learn how to fix net command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.