About
ifconfig is the equivalent of ipconfig in DOS where you can configure network interface.
Without parameters, it gives you the list of interface with their corresponding IP.
Articles Related
Management
Installation
apt-get install -y net-tools
Example
Below you can see two interfaces :
- eth0 : an ethernet interface with the IP 192.168.96.232
- lo : the loopback interface with the IP 127.0.0.1
[root@oel11g ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:79:3E:8C
inet addr:192.168.96.232 Bcast:192.168.97.255 Mask:255.255.254.0
inet6 addr: fe80::20c:29ff:fe79:3e8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71800 errors:0 dropped:0 overruns:0 frame:0
TX packets:9218 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16185577 (15.4 MiB) TX bytes:1167946 (1.1 MiB)
Interrupt:59 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4770 errors:0 dropped:0 overruns:0 frame:0
TX packets:4770 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6175911 (5.8 MiB) TX bytes:6175911 (5.8 MiB)