Home Debian How to add missing ifconfig command on Debian

How to add missing ifconfig command on Debian

by Emmanuel
ifconfig missing debian

In this article, we will be tackle how to add the missing ifconfig command on Debian. We will run all this on Debian version 11, “bullseye.” This Debian version ships with the new package ipp-usb, recommended by cups-daemon, and utilizes the vendor-neutral IPP-over-USB protocol reinforced by multiple modern printers. This, in turn, allows a USB device to be treated as a network device, expanding driverless printing to include USB-connected printers.

The ifconfig (interface configuration) command is a vital utility to configure the kernel-resident network interfaces. It is used to initialize the interfaces as required during the boot time. On the flip side, it is also used when debugging or when you need system tuning. Furthermore, this command is used to assign the IP address and netmask to an interface or enable or disable a given interface. The command is available under the net-tools package.

Missing ifconfig on Debian

A number of you may have encountered an error while running the ifconfig command. This mostly happens while trying to authenticate the IP address of your network interface (es). The error alert indicates that the “ifconfig command not found.” as shown in the following snapshot:

ifconfig not found

ifconfig not found

So what happens from here?

From Debian 9(stretch), the ifconfig is obsoleted, and due to this, you get the error message as shown in the snapshot above about the missing ifconfig command. A workaround for this hitch is the ip addr command, which more or less does pretty much similar jobs as the ifconfig command, as shown in the snapshot below.

ip addr
ip addr command

ip addr command

In the above screenshot, the command proceeds to show the IP address and other statistical data of all of your network interfaces, which is pretty much the same thing you have been looking for.

But if you are still persistent in using the ‘ifconfig” command, you will need to install the Network tools package to attain this. A net-tools package is a directory that contains a collection of programs that form the basis of Linux networking.

This package includes hostname(1), iptunnel, mii-tool(8), nameif(8), arp(8), ifconfig(8), ipmaddr, netstat(8), rarp(8), route (8) and slattach (8). However, some of these tools are obsolete by now. Take a look at the following evaluation table of the current programs/commands vs. the obsoleted by commands.

ProgramsObsoleted by
mii-toolethtool
routeip route
nameififrename
ipmaddrip maddr
iptunnelip tunnel
arpip neigh
ifconfigip addr

Fix the missing ifconfig command on Debian

To counter this error, we will install the net-tools package by issuing the following command:

sudo apt install net-tools –y

The “–y” flag in the command helps in telling the command to proceed with the installation without asking you to affirm your decision on whether to proceed with the installation or not.

The above-given command triggers the installation of the net-tools packages in the company of other software dependencies, as shown in the snapshot below:

install network tools

install network tools

Once the installation is done and successful, try to run the ifconfig command once more to see if it was successful. This time around, your network statistics should be displayed on the terminal.

ifconfig
command still not found

The command is still not found.

After rerunning the command, you should see the network statistics. However, in some instances, you will notice the error persists, like in our case. Then how do we salvage ourselves out of this misery? It is effortless, pals; you should notice that the regular user that we are typing in the command does not have /sbin directory in its path. The /sbin path is ifconfig’s full path. In short, we need to call ifconfig using its full path; otherwise, the ifconfig command by itself will not still work for those the error persisted.

Let us type in the ifconfig full path followed by the command, and it should work. Take a look at this snapshot:

/sbin/ifconfig
ifconfig functioning well

ifconfig functioning well

Conclusion

This was a brief guide on how you can fix the missing ifconfig command error on Debian 11 (Bullseye). We hope the steps were sufficient enough for you to work around this error. Besides the ifconfig command, you can also utilize the ip addr we looked at earlier to get your network interface statistics.

You may also like

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.