Files
cheatsheet-tldr/tldr/linux/ip
2025-03-08 00:14:59 +00:00

43 lines
885 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# ip
> Show/manipulate routing, devices, policy routing and tunnels.
> Some subcommands such as `address` have their own usage documentation.
> More information: <https://www.manned.org/ip.8>.
- List interfaces with detailed info:
`ip {{[a|address]}}`
- List interfaces with brief network layer info:
`ip {{[-br a|-brief address]}}`
- List interfaces with brief link layer info:
`ip {{[-br l|-brief link]}}`
- Display the routing table:
`ip {{[r|route]}}`
- Show neighbors (ARP table):
`ip {{[n|neighbour]}}`
- Make an interface up/down:
`ip {{[l|link]}} set {{interface}} {{up|down}}`
- Add/Delete an IP address to an interface:
`ip {{[a|address]}} add/del {{ip}}/{{mask}} dev {{interface}}`
- Add a default route:
`ip {{[r|route]}} add default via {{ip}} dev {{interface}}`