netstat command not found on CentOS 7 and RHEL 7 (Red Hat Enterprise Linux 7)

We have observed many new changes on Red Hat Enterprise Linux and CentOS 7 . With the previous RHEL and CentOS version, netstat command was available even in minimal installation. On CentOS 7 and RHEL 7, on doing minimal installation we have not found netstat command.

To get the netstat command on RHEL 7 and CentOS 7. Use the below given command to install net-tools package

yum install net-tools

We Suggest to read our post : yum : how to find rpm package which has certain command or file

The given below is insight detail how we got to know net-tools has netstat command.

[root@localhost ~]# yum provides */netstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * extras: centos.aol.in
 * updates: centos.aol.in
ctdb-tests-2.5.1-2.el7.x86_64 : CTDB clustered database test suite
Repo        : base
Matched from:
Filename    : /usr/share/ctdb-tests/eventscripts/stubs/netstat



net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools
Repo        : base
Matched from:
Filename    : /bin/netstat



[root@localhost ~]# 
[root@localhost ~]# yum install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.aol.in
 * extras: centos.aol.in
 * updates: centos.aol.in
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
--> Finished Dependency Resolution

Dependencies 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
Is this ok [y/d/N]: y
Downloading packages:
net-tools-2.0-0.17.20131004git.el7.x86_64.rpm                                                                             | 304 kB  00:00:11     
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!
[root@localhost ~]# 

3 thoughts on “netstat command not found on CentOS 7 and RHEL 7 (Red Hat Enterprise Linux 7)”

Comments are closed.