ip

See network interfaces and addresses

What it does

ip a (short for ip address) lists the network interfaces and their addresses. lo is the loopback with the address 127.0.0.1, which the machine uses to talk to itself; an outside interface such as eth0 or ens3 holds the server's network address.

ip r shows the routes, including the default gateway that traffic to the internet goes through. The old ifconfig does something similar, but newer systems often do not have it.

Syntax

ip a
ip r

Examples

Related commands

Practise · All commands