After running the ip a command, simply look beside inet for IPv4 and inet6 for IPv6.