Configure and display network interfaces, routes, and addresses.
high risk
(sleep 120 && ip link set <if> up) &Safety net: re-enable the interface automatically.ip route get <destination>See which route would be used before modifying routes.ip is the modern replacement for ifconfig and route. It manages network interfaces, IP addresses, routes, ARP tables, and network namespaces. Changes made with ip are temporary (lost on reboot) unless written to network configuration files.
| Flag | Meaning |
|---|---|
-br --brief | Brief one-line output per object |
-j --json | Output in JSON format |
-4 | Show IPv4 only |
-6 | Show IPv6 only |
ip addr showShow all interface addresses · explain & risk-check →ip -br addrBrief interface summary (cleaner output) · explain & risk-check →ip route showShow routing table · explain & risk-check →ip route get 8.8.8.8Show which interface/gateway reaches a destination · explain & risk-check →ip link set eth0 upBring interface up · explain & risk-check →ip addr add 192.168.1.100/24 dev eth0Add an IP address to interface · explain & risk-check →Use `ip route get <destination>` to instantly see which gateway and interface will be used to reach any IP — faster and more definitive than tracing routing tables manually.
Reference text is hand-written and may be incomplete — check man ip for your version. Test destructive commands on a non-production system first.