2020-03-27 13:37:59 +00:00
|
|
|
# ip address
|
|
|
|
|
|
|
|
> IP Address management subcommand.
|
2021-09-02 15:33:49 -03:00
|
|
|
> More information: <https://manned.org/ip-address>.
|
2020-03-27 13:37:59 +00:00
|
|
|
|
|
|
|
- List network interfaces and their associated IP addresses:
|
|
|
|
|
2025-03-07 13:05:55 +02:00
|
|
|
`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}}`
|