ifconfig – configure a network interface

ifconfig command is a very common Unix/Linux command for showing details and updating configuration of network interfaces.

Installing ifconfig

If you’re getting the ifconfig: command not found error, it means you need to install net-tools package.

Show All Interfaces with ifconfig

root@debian9:~# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.62 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:febe:8a41 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:be:8a:41 txqueuelen 1000 (Ethernet)
RX packets 111631 bytes 143152723 (136.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31735 bytes 2379494 (2.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 8744 bytes 1625895 (1.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8744 bytes 1625895 (1.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

See Also




Keep Learning

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!

Recent Tweets