How to install missing ifconfig utility

ifconfig is not installed by default in Debian Stretch. However, it is available in package repositoriy, so applications that depends on it can still be used.

Check if the application is not already installed.

$ sudo ifconfig
sudo: ifconfig: command not found

This utility is provided by net-tools package.

$ dpkg-query -S /sbin/ifconfig
net-tools: /sbin/ifconfig

Install net-tools package.

$ sudo apt-get install net-tools

Check ifconfig output.

$ sudo ifconfig                                                                                                                                                                                                                
eth0: flags=4163  mtu 1500
        inet 192.168.1.170  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::5054:ff:fe02:4adc  prefixlen 64  scopeid 0x20
        ether 52:54:00:02:4a:dc  txqueuelen 1000  (Ethernet)
        RX packets 2180  bytes 4529382 (4.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1793  bytes 140026 (136.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Milosz Galazka's Picture

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system. He is also open for new opportunities and challenges.

Gdansk, Poland https://sleeplessbeastie.eu