HowTo: Find IP Address in Ubuntu Linux

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

Fig. 01: Display an IP address using ip command on Ubuntu server

The syntax is as follows to display your IP address in Ubuntu Linux:
ip a list
Sample outputs:

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether f0:1f:af:1f:2c:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global eth1
    inet6 fe80::f21f:afff:fe1f:2c60/64 scope link
       valid_lft forever preferred_lft forever
3: usb0:  mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 02:15:e0:ec:01:00 brd ff:ff:ff:ff:ff:ff
4: wlan1:  mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 6c:88:14:94:f4:d8 brd ff:ff:ff:ff:ff:ff
5: vmnet1:  mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:50:56:c0:00:01 brd ff:ff:ff:ff:ff:ff
    inet 192.168.136.1/24 brd 192.168.136.255 scope global vmnet1
    inet6 fe80::250:56ff:fec0:1/64 scope link
       valid_lft forever preferred_lft forever
6: vmnet8:  mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff
    inet 172.16.33.1/24 brd 172.16.33.255 scope global vmnet8
    inet6 fe80::250:56ff:fec0:8/64 scope link
       valid_lft forever preferred_lft forever

Just display the IP address for eth1 or eth0 device in Ubuntu

The syntax is:
ip a list eth0
ip a list eth1

Sample outputs:

2: eth1:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether f0:1f:af:1f:2c:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global eth1
    inet6 fe80::f21f:afff:fe1f:2c60/64 scope link
       valid_lft forever preferred_lft forever
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: