≡ Menu

Use ifconfig command in Ubuntu to determine IP address

Fig. 03: ifconfig command in action

The ifconfig is used to configure the kernel-resident network interfaces. If no arguments are given, ifconfig displays the status of the currently active interfaces.

ifconfig syntax and examples

The basic syntax is as follows:

ifconfig -a
ifconfig -a | less
ifconfig -a | grep 'something'
ifconfig eth1

Sample outputs:

eth1      Link encap:Ethernet  HWaddr f0:1f:af:1f:2c:60  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::f21f:afff:fe1f:2c60/64 Scope:Link
          RX packets:11943 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9162 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6533975 (6.5 MB)  TX bytes:3009957 (3.0 MB)
          Interrupt:20 Memory:f7700000-f7720000 

See ifconfig(8) command man page for more information.

Share this tutorial on:

Examples and usage: Ubuntu Linux: Determine Your IP Address

{ 0 comments… add one }
Security: Are you a robot or human?
You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: