1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 11:46:01 +02:00
tldr/pages/linux/ip-address.md

29 lines
757 B
Markdown
Raw Normal View History

2020-03-27 13:37:59 +00:00
# ip address
> IP Address management subcommand.
> More information: <https://manned.org/ip-address>.
2020-03-27 13:37:59 +00:00
- List network interfaces and their associated IP addresses:
`ip {{[a|address]}}`
2020-03-27 13:37:59 +00:00
- Filter to show only active network interfaces:
2025-03-09 14:01:49 +02:00
`ip {{[a|address]}} {{[s|show]}} up`
2020-03-27 13:37:59 +00:00
- Display information about a specific network interface:
2025-03-09 14:01:49 +02:00
`ip {{[a|address]}} {{[s|show]}} {{eth0}}`
2020-03-27 13:37:59 +00:00
- Add an IP address to a network interface:
2025-03-09 14:01:49 +02:00
`sudo ip {{[a|address]}} {{[a|add]}} {{ip_address}} dev {{eth0}}`
2020-03-27 13:37:59 +00:00
- Remove an IP address from a network interface:
2025-03-09 14:01:49 +02:00
`sudo ip {{[a|address]}} {{[d|delete]}} {{ip_address}} dev {{eth0}}`
2020-03-27 13:37:59 +00:00
- Delete all IP addresses in a given scope from a network interface:
2025-03-09 14:01:49 +02:00
`sudo ip {{[a|address]}} {{[f|flush]}} {{eth0}} scope {{global|host|link}}`