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 addrOne short line per network card, with its address.
$ ip routeThe routes. default via … is the gateway.
$ hostname -IJust the addresses, nothing else.
Learn it in: IP addresses: the shop's number · Official docs