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