⌘K
ip
linux
Show/manipulate routing, devices, policy routing and tunnels. Some subcommands such as `address` have their own usage documentation.
More info →Options (7)
booleanList interfaces with detailed info
Example:
ip {{[a|address]}}booleanList interfaces with brief network layer info
Example:
ip {{[-br|-brief]}} {{[a|address]}}booleanList interfaces with brief link layer info
Example:
ip {{[-br|-brief]}} {{[l|link]}}booleanDisplay the routing table
Example:
ip {{[r|route]}}booleanShow neighbors (ARP table)
Example:
ip {{[n|neighbour]}}booleanMake an interface up/down
Example:
sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} {{up|down}}booleanAdd a default route
Example:
sudo ip {{[r|route]}} {{[a|add]}} default via {{ip_address}} dev {{ethX}}Examples (8)
List interfaces with detailed info
ip [a|address]List interfaces with brief network layer info
ip [-br|-brief] [a|address]List interfaces with brief link layer info
ip [-br|-brief] [l|link]Display the routing table
ip [r|route]Show neighbors (ARP table)
ip [n|neighbour]Make an interface up/down
sudo ip [l|link] [s|set] ethX up|downAdd/Delete an IP address to an interface
sudo ip [a|address] add|delete ip_address/mask dev ethXAdd a default route
sudo ip [r|route] [a|add] default via ip_address dev ethXmade by @shridhargupta | data from tldr-pages