There are a couple of ways of doing it on both Windows and Linux. For example,
-
nslookup: the classic way to find the IP address from a hostname or vice-versa.
-
ipconfig or ifconfig based on whether you are running on Windows or Unix
-
hostname -i on Linux