Linux - ifconfig (Interface Configuration)

> Operating System - Kernel (Windows, Unix, Linux) > Linux / Unix

1 - 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.

Advertising

3 - Management

3.1 - Installation

apt-get install -y net-tools

4 - 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
[[email protected] ~]# 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)

5 - Documentation / Reference

os/linux/ifconfig.txt · Last modified: 2018/09/16 12:42 by gerardnico