https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/
Don’t be intimidated by ip command syntax. Let us get started quickly with examples.
Type the following command to list and show all ip address associated on on all network interfaces:
ip a
OR
ip addr
Sample outputs:
Fig.01 Showing IP address assigned to eth0, eth1, lo using ip command
You can select between IPv4 and IPv6 using the following syntax:
### Only show TCP/IP IPv4 ##
ip-4 a
### Only show TCP/IP IPv6 ###
ip-6 a
It is also possible to specify and list particular interface TCP/IP details:
### Only show eth0 interface ###
ip a show eth0
ip a list eth0
ip a show dev eth0
### Only show running interfaces ###
ip linkls up
The syntax is as follows to add an IPv4/IPv6 address: