FahamLah

Commands

ip

ip [-br] addr | ip route

Risk: Safe

What it does

Shows this machine's addresses and the way out (its routes).

When to use it

To find a server's number, or its gateway.

Example

$ ip -br addr

One short line per network card, with its address.

$ ip route

The routes. default via … is the gateway.

$ hostname -I

Just the addresses, nothing else.