How to install missing ifconfig command on CentOS Linux


The ifconfig command has been deprecated and thus missing by default on CentOS Linux.

# ifconfig
bash: /usr/sbin/ifconfig: No such file or directory

The new and recommended alternative for examining a network configuration on CentOS Linux is ip command. For example to use ip command to display a network configuration run the following:

# ip address

The above ip command can be abbreviated to:

# ip a

If you still prefer to use ifconfig command you can easily install it as part of the net-tools package.


Privileged access to your CentOS Linux system is required.




  • # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ – requires given linux commands to be executed as a regular non-privileged user


Install ifconfig command with yum

Using yum command install net-tools package:

# yum install net-tools

The ifconfig command is now available.

Comments and Discussions
Linux Forum