INTERACTIVE COMMAND EXPLORER
NETWORK
satya@dbresilience:~$ hostname -I
192.0.2.10 2001:db8::10
Enter run
↑/↓ history
Tab complete
Show host IP addresses
hostname -I shows host addresses. A host can have multiple addresses.
OPERATOR TRICK
Use ip addr when you need interface-by-interface detail. Uppercase -I is not the same option as lowercase -i.
SIMPLE USE CASE
A database connection works on one network path but not another. First establish which addresses are configured.
DBA ANGLE
Useful before checking listeners, PostgreSQL connectivity, DB2 Linux HADR paths, replication, DNS, or firewalls.