ifconfig command not found on CentOS 7

On CentOS 6.x and before, ifconfig command by default used to  shipped. Whereas in minimal installed CentOS 7 , I have not found ifconfig command.

This will give you the error , ifconfig command not found.

To get the ifconfig command into our system , run the below given command

yum install net-tools

Now check the ifconfig command and its path in system (which and whereis command will help)

ifconfig -a
which ifconfig
whereis ifconfig

How I got to know net-tools package need to be installed

Using yum command with provides or whatprovides options help to give you list of package which is required for that particular command.

As per man page of yum :

provides or whatprovides
Is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the packages available or installed that provide that feature or file.

We have used the below given command to find which package provides the ifconfig command.

yum provides ifconfig

Below screenshot is last section of command output.


Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.