Linux Commands

How to Install Missing ifconfig Command on Linux

ifconfig is a command line utility that you can use to get the details of the network interface of your system. Most of the time ifconfig command is already installed on the Linux system but somehow you get an error that the command or file or directory does not exist. Thi error can easily be resolved. In this article you will learn how to install the missing ifconfig command on a Linux system.

How to Install Missing ifconfig Command on Linux

When running the “ifconfig” command on Linux, you may experience a missing “ifconfig” command error or the “ifconfig: no such file or directory” error as shown below:

The above problem occurs because you have accidentally deleted the ifconfig command line utility from Linux system and you can install it on your system again by running the following command:

sudo apt install net-tools

The net-tools are a suite of network-related packages that includes ifconfig command line utility.

After the installation of net-tools, you can get ifconfig command in your system and you can check if it exists on your system or not by executing the command given below:

echo "ifconfig exists"

Now, you can get the details about your network interfaces by executing the command given below:


Alternative to ifconfig Command on Linux

There is another alternative of the ifconfig command that provides similar outputs as ifconfig command. As an alternative to the ifconfig command run the given below command to get the network interfaces information on the terminal.

ip a


Sometimes commands or utilities are accidentally deleted from the system and as a result, you won’t be able to run the command on the terminal. The same is the case with the ifconfig command which is used to get the network interface details on your Linux system. If you find a missing ifconfig error while executing the command, you can install net-tools and use the command again on the Linux system.

About the author

Rafia Amjad

I have a degree in Electronics and love to write. My research and writing emphasize on the most recent innovations in gaming and technology.