One way to to get the IP address of a Linux system from the Linux command line is this:
$ hostname -I
hostname command, followed by a capital letter
i as a command line parameter. On my Raspberry Pi system, this command returns its IP address -- and only its IP address -- like this:
It’s nice that this command returns only the IP address, because that means I don’t have to pipe together several commands to get what I need.