1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 11:17:59 +01:00
tldr/pages/linux/ip.md

24 lines
400 B
Markdown
Raw Normal View History

2014-02-25 03:25:47 +01:00
# ip
> Show / manipulate routing, devices, policy routing and tunnels.
2014-02-25 03:25:47 +01:00
- List interfaces with detailed info:
2014-02-25 03:25:47 +01:00
`ip a`
- Display the routing table:
2014-02-25 03:25:47 +01:00
`ip r`
- Make an interface up/down:
2014-02-25 03:25:47 +01:00
`ip link set {{interface}} up/down`
- Add/Delete an ip address to an interface:
2014-02-25 03:25:47 +01:00
`ip addr add/del {{ip}}/{{mask}} dev {{interface}}`
2014-02-25 03:25:47 +01:00
- Add an default route:
2014-02-25 03:25:47 +01:00
`ip route add default via {{ip}} dev {{interface}}`