Insight: How To Fix netstat Command not found on CentOS 7 / RHEL 7
This tutorial is for you if you have a problem of netstat command not found on CentOS or RHEL after the fresh installation. netstat is a command line network management utility. You can see network connections, interfaces statistics, routing tables and other stats via this tool.
How To Fix netstat Command Not Found On CentOS 7 / RHEL 7
You might see the following message after running netstat command:
-bash: netstat: command not found
One of the quick trick is to know which package provides us netstat command in CentOS or RHEL. Run the following command to know the package that provides us netstat command:
yum whatprovides netstat
You might see something like this:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.chi.host-engine.com
* epel: mirror.steadfast.net
* extras: repo.us.bigstepcloud.com
* updates: centos.chi.host-engine.com
net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools
Repo : base
Matched from:
Filename : /bin/netstat
As you can see that net-tools package provides netstat command, Install the net-tools package using the following command.
yum -y install net-tools
You will have a output like this:
ependencies Resolved ==================================================================================================================================================================================================== Package Arch Version Repository Size ==================================================================================================================================================================================================== Installing: net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k Transaction Summary ==================================================================================================================================================================================================== Install 1 Package Total download size: 304 k Installed size: 917 k Downloading packages: net-tools-2.0-0.17.20131004git.el7.x86_64.rpm | 304 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 Verifying : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 Installed: net-tools.x86_64 0:2.0-0.17.20131004git.el7 Complete!
You are now good to go as your problem for netstat Command Not Found On CentOS 7 / RHEL 7 has been fixed.