Showing the IP addresses assigned to a Linux host is the fastest way to confirm how the system identifies itself on the network before troubleshooting reachability, updating firewall rules, or choosing the address a service should listen on.
The ip utility from iproute2 reads the kernel's current network state and displays IPv4 and IPv6 addresses attached to loopback, Ethernet, Wi-Fi, bridge, VLAN, VPN, and container interfaces. The ip address show form is the full view, while selectors such as dev, up, -4, -6, and -br narrow the same data without changing any configuration.
Many systems carry more than one address at the same time, and the output may include loopback, link-local, temporary IPv6, or container-related interfaces alongside the main LAN address. Look for inet and inet6 lines on the expected interface, and remember that scope host entries such as 127.0.0.1 and ::1 are local to the machine rather than reachable from the network.
$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
##### snipped #####
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 192.0.2.40/24 brd 192.0.2.255 scope global dynamic eth0
valid_lft 1792sec preferred_lft 1792sec
inet6 2001:db8:1:1::40/64 scope global dynamic
valid_lft 1792sec preferred_lft 1792sec
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
The full view is the best starting point when multiple interfaces or both address families are involved. The show subcommand can be omitted because ip address defaults to the same display.
$ ip address show up
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.0.2.40/24 brd 192.0.2.255 scope global dynamic eth0
valid_lft 1792sec preferred_lft 1792sec
inet6 2001:db8:1:1::40/64 scope global dynamic
valid_lft 1792sec preferred_lft 1792sec
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
up only filters the interface state. Loopback still appears because it is normally active, even though it is not a LAN address.
$ ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 192.0.2.40/24 brd 192.0.2.255 scope global dynamic eth0
valid_lft 1792sec preferred_lft 1792sec
inet6 2001:db8:1:1::40/64 scope global dynamic
valid_lft 1792sec preferred_lft 1792sec
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
Replace eth0 with the actual interface name, such as enp1s0, ens33, or wlp2s0. Container and veth interfaces may show a suffix such as @if215 after the name.
$ ip -br address show lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 UP 192.0.2.40/24 2001:db8:1:1::40/64 fe80::5054:ff:fe12:3456/64
-br keeps the same address data but drops the multiline detail, which is useful for quick checks or terminal screenshots.
$ ip -4 address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.0.2.40/24 brd 192.0.2.255 scope global dynamic eth0
valid_lft 1792sec preferred_lft 1792sec
-4 is a shortcut for the inet address family, so IPv6 lines are hidden from the result.
$ ip -6 address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2001:db8:1:1::40/64 scope global dynamic
valid_lft 1792sec preferred_lft 1792sec
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
If only ::1 or link-local addresses appear, the host does not currently have a usable non-loopback global IPv6 address on that interface.