ifconfig command is a useful utility for getting network configuration details on Debian Linux systems. With the older versions of Debian operating systems, ifconfig command packages were default installed. but with the latest Debian systems, the ifconfig command was not installed default with operating system installation.
Error, I faced while running ifconfig on newly installed Debian system:
-bash: ifconfig: command not found
Install Package for ifconfig on Debian
ifconfig command comes from net-tools Debian package. Install this package using the following command which is available under default repositories.
Getting Interface Information using ifconfig
Then you can use this command to check network configuration details. Below command will show details for all interfaces configured on your Debian system.
[email protected]:~# ifconfig enp0s3: flags=4163
mtu 1500 inet 192.168.1.237 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::a00:27ff:fe2b:861a prefixlen 64 scopeid 0x20 ether 08:00:27:2b:86:1a txqueuelen 1000 (Ethernet) RX packets 3347 bytes 1777600 (1.6 MiB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 1262 bytes 119822 (117.0 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 1000 (Local Loopback) RX packets 69 bytes 4756 (4.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 69 bytes 4756 (4.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Use below command to show details for interface eth0 in system
To get all interfaces details using ifconfig use following command.