How to install missing ifconfig command on Linux

Most of us longtime Linux users have the ifconfig command seared into our brain, after years of repetitive use. It comes as a shock to some when they type the command and are met with an error message (ifconfig command not found). Indeed, the command has become deprecated, but it’s still possible to install ifconfig command.

In this tutorial, you will see how to install ifconfig command on Debian based and Red Hat based Linux distributions, as well as how to use the newer ip a command, which is meant to replace ifconfig.

In this tutorial you will learn:

  • How to install the ifconfig command on Linux
  • How to use the ip a command
Installing and using the ifconfig command on Debian
Installing and using the ifconfig command on Debian
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software net-tools
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – 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 missing ifconfig command




The ifconfig command has been deprecated and thus missing by default on some modern Linux distributions. You will receive a message “ifconfig command not found” if you try to use it.

# ifconfig
-bash: ifconfig: command not found

The new and recommended alternative for examining a network configuration on Linux is with the 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 as part of your daily sysadmin routine, you can easily install ifconfig as part of the net-tools package.

On Debian based distros:

# apt update
# apt install net-tools

On Red Hat based distros:

# dnf install net-tools

The ifconfig command is now available:

Installing and using the ifconfig command on Debian
Installing and using the ifconfig command on Debian


Closing Thoughts

In this tutorial, we saw how to install the ifconfig command on Linux. Even though the command has been deprecated and there is a new successor, there is no harm in still using the old command if you find that it’s a habit which is difficult to break.