ip-address
TLDR
List all addresses
$ ip address
Show only active interfaces$ ip address show up
Show specific interface$ ip address show eth0
Add IP address$ sudo ip address add 192.168.1.100/24 dev eth0
Delete IP address$ sudo ip address delete 192.168.1.100/24 dev eth0
Flush addresses by scope$ sudo ip address flush eth0 scope global
SYNOPSIS
ip address [command] [OPTIONS]
DESCRIPTION
ip address manages IP addresses on network interfaces. It can display, add, delete, and flush addresses for both IPv4 and IPv6 protocols.
PARAMETERS
show [device]
Display IP addresses (default action)add address dev device
Add an IP address to interfacedelete address dev device
Remove an IP address from interfaceflush device
Remove all addresses from interfaceup
Filter to show only active interfacesscope global|link|host
Filter or set address scopelabel label
Set address labelbroadcast address
Set broadcast address
CAVEATS
Addresses added are not persistent across reboots. Use network configuration files or NetworkManager for persistence. An interface can have multiple IP addresses.
HISTORY
ip address is part of iproute2, replacing the deprecated ifconfig command.


