When to use ip
Use ip to inspect Linux network interfaces and routing decisions before changing connectivity. Read-only queries are a safe starting point, especially when the SSH connection itself depends on the network configuration.
Syntax
ip [PARAMETERS] OBJECT COMMANDSquare brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
Show addresses
ip -br addrInterface addresses are shown in a compact format.
View routes
ip route showThe routing table is displayed without modification.
Check selected route
ip route get 1.1.1.1The kernel's route choice for the selected destination is queried without proving end-to-end reachability.
Notes and limitations
- show and get inspect the network. add, del and set can change it.
- Changing an address or route over SSH can immediately disconnect your session.
Common questions and troubleshooting
Does route get send a connectivity test?
No. It reports a routing decision. A selected route does not prove the remote service or intermediate path is working.
Why is ip unavailable on my Mac?
These examples target the Linux iproute2 tool on the server. Other operating systems use different networking tools and options.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man ip.