Skip to content

Bash ifconfig: command not found in Ubuntu & Debian

bash ifconfig: command not found on Debian Linux. installing ifconfig command on Ubuntu and Debian. What is ifconfig command package.

Covers
command, debian, ifconfig
Advertisement
On this page

The ifconfig command is a useful utility to display and set network configuration on Ubuntu and Debian Linux systems. This command is available under the net-tools package is replaced with modern iproute2 Debian packages.

When your type ifconfig command on the latest operating systems, you will get the following error on Ubuntu and Debian-based systems.

-bash: ifconfig: command not found

ifconfig command not found

Install net-tools Package

The ifconfig binary file comes with the net-tools Debian package. Install this package using the following command which is available under default repositories.

sudo apt-get install net-tools 
Advertisement

Using ifconfig

Then you can use this command to check network configuration details. The below command will show details for all interfaces configured on your Debian system.

ifconfig 
Output:
eth0: flags=4163 mtu 1500 inet 206.81.1.33 netmask 255.255.240.0 broadcast 206.81.15.255 inet6 fe80::6cdc:96ff:fe05:82a8 prefixlen 64 scopeid 0x20 ether 6e:dc:96:05:82:a8 txqueuelen 1000 (Ethernet) RX packets 43032855 bytes 6789955172 (6.7 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 38997280 bytes 38954070507 (38.9 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth1: flags=4163 mtu 1500 inet 10.136.0.2 netmask 255.255.0.0 broadcast 10.136.255.255 inet6 fe80::14d4:5eff:fe05:e5ed prefixlen 64 scopeid 0x20 ether 16:d4:5e:05:e5:ed txqueuelen 1000 (Ethernet) RX packets 311 bytes 21770 (21.7 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 327 bytes 22986 (22.9 KB) 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 1000 (Local Loopback) RX packets 700780899 bytes 2751296590452 (2.7 TB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 700780899 bytes 2751296590452 (2.7 TB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Use below command to show details for interface eth0 in system

ifconfig eth0 

To get all interfaces details using ifconfig use the following command.

ifconfig -a 

Conclusion

This tutorial helped you to resolve -bash: ifconfig: command not found error on an Ubuntu and other Debian-based systems.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

4 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top