I'm using the following centos version

$ cat /etc/centos-release
CentOS Linux release 7.0.1406 (Core)

The commands nmap , netstat and lsof are not found on CentOS7. Why?

$ type -a nmap
bash: type: nmap: not found

$ type -a netstat
bash: type: netstat: not found

$ type -a lsof
bash: type: lsof: not found

What should i do to make these work?

Best Answer


The package net-tools was deprecated in CentOS7 in favour of the iproute2 suite. You may either install the code manually or check the guide for replacement commands

EDIT

Here is the URL to Red Hat's Bugzilla for RHEL7 that covers the deprecation of netstat in more detail: https://bugzilla.redhat.com/show_bug.cgi?id=1119297

Excerpt

As stated before, net-tools are deprecated thus shouldn't be used unless necessary. Behaviour in RHEL 7 is the same as in Fedora - net-tools is missing from minimal install, but is in @base (~= @standard in Fedora) which is installed in all non-minimal configurations.

There are also other tickets that deal with this such as the ids 682308 and 687920 Note that they're assigned to the fedora project and are quite old