How to find the IP addresses of a Linux system

The following command in a linux based system will show all the IPs assigned to that system:
# ip addr show

Or alternatively, if you’d like to know the IP address(es) of a certain port (for example eth0) type the following:
# ip addr show eth0

Sample output:
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:30:67:b4:b7:4d brd ff:ff:ff:ff:ff:ff
inet 72.144.122.10/29 brd 72.144.122.15 scope global eth0
inet6 ef80::120:67ef:deb4:f74e/64 scope link
valid_lft forever preferred_lft forever

The IPv4 assigned to the system are: 72.144.122.10/29  (72.144.122.10 – 72.144.122.15 = 6 IPs)
The IPv6 assigned to the system are: ef80::120:67ef:deb4:f74e/64

Leave a Reply

Your email address will not be published. Required fields are marked *