mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-22 09:51:20 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
42
tldr/linux/ip
Normal file
42
tldr/linux/ip
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
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 `ip address` have their own usage documentation.
|
||||
> More information: <https://www.man7.org/linux/man-pages/man8/ip.8.html>.
|
||||
|
||||
- List interfaces with detailed info:
|
||||
|
||||
`ip address`
|
||||
|
||||
- List interfaces with brief network layer info:
|
||||
|
||||
`ip -brief address`
|
||||
|
||||
- List interfaces with brief link layer info:
|
||||
|
||||
`ip -brief link`
|
||||
|
||||
- Display the routing table:
|
||||
|
||||
`ip route`
|
||||
|
||||
- Show neighbors (ARP table):
|
||||
|
||||
`ip neighbour`
|
||||
|
||||
- Make an interface up/down:
|
||||
|
||||
`ip link set {{interface}} {{up|down}}`
|
||||
|
||||
- Add/Delete an IP address to an interface:
|
||||
|
||||
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
|
||||
|
||||
- Add a default route:
|
||||
|
||||
`ip route add default via {{ip}} dev {{interface}}`
|
||||
Reference in New Issue
Block a user