Use ifconfig command in Ubuntu to determine IP address

by on January 17, 2014 · 0 comments· LAST UPDATED January 17, 2014

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:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f21f:afff:fe1f:2c60/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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.

TwitterFacebookGoogle+Found an error/typo on this page? Help us!

Examples and usage: Ubuntu Linux: Determine Your IP Address

{ 0 comments… add one now }

Leave a Comment

Tagged as: