The command that is used is called as "ip address show" it shows all the addresses and the drivers to which they are connected and the details about certain specific subnets.
Three commands can be used to view active IP address :
ip address show: Displays information about active IP addresses, subnet masks, broadcast addresses, and other network details for each interface on a Linux machine.
ifconfig: Traditionally used to show network interface information, including IP addresses.
ip a: A shorthand for ip address show, providing details about active IP addresses and network interfaces on a Linux machine.