Troubleshooting: CentOS 7 – netstat command not found

Troubleshooting: CentOS 7 – netstat command not found

Lately, I was installing Nginx Plus on CentOS 7 and wanted to verify if it’s listening on port 80 using netstat or not.

Guess what? I got the below error while executing netstat.

[[email protected] init.d]# netstat -anlp |grep 80 -bash: netstat: command not found [[email protected] init.d]#


Install net-tools using yum command

 yum install net-tools


[[email protected] init.d]# yum install net-tools Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile  * base:  * epel:  * extras:  * updates: Resolving Dependencies --> Running transaction check ---> Package net-tools.x86_64 0:2.0-0.22.20131004git.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ===============================================================================================================================================================  Package                             Arch                             Version                                             Repository                      Size =============================================================================================================================================================== Installing:  net-tools                           x86_64                           2.0-0.22.20131004git.el7                            base                           305 k Transaction Summary =============================================================================================================================================================== Install  1 Package Total download size: 305 k Installed size: 917 k Is this ok [y/d/N]: y Downloading packages: net-tools-2.0-0.22.20131004git.el7.x86_64.rpm                                                                                           | 305 kB  00:00:04      Running transaction check Running transaction test Transaction test succeeded Running transaction   Installing : net-tools-2.0-0.22.20131004git.el7.x86_64                                                                                                   1/1    Verifying  : net-tools-2.0-0.22.20131004git.el7.x86_64                                                                                                   1/1  Installed:   net-tools.x86_64 0:2.0-0.22.20131004git.el7                                                                                                                   Complete! [[email protected] init.d]#

and then I was able to use netstat.

[[email protected] init.d]# netstat -anlp |grep 80 tcp        0      0    *               LISTEN      1818/nginx: master   [[email protected] init.d]#

I hope this helps you in troubleshooting netstat not found error on CentOS 7.


Our trusted sources

We only publish news from well-known cybercrime magazines via RSS. You will find here everything about hackers & cybercrime. Also you can visit the direct sources from us.

Just click on one of the buttons.


Check out our Guidebook page.  And read everything about it.  Also how to protect yourself from hacker attacks.  An all in one thing.