How to find my own IP address in CentOS

Two commands come to the rescue: ip and ifconfig. Either does the trick:

#ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:19:99:0D:D2:58  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::219:99ff:fe0d:d258/64 Scope:Link
          RX packets:14022830 errors:1 dropped:0 overruns:0 frame:1
          TX packets:17605482 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6842851425 (6.3 GiB)  TX bytes:22015650673 (20.5 GiB)
          Interrupt:225 Base address:0x2000 

Slightly more parameters with ip, and slightly less output:

#ip addr show eth0

2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:19:99:0d:d2:58 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet6 fe80::219:99ff:fe0d:d258/64 scope link 
       valid_lft forever preferred_lft forever

The output on the second line is the IP address (in our example

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at and