How to find IP address from hostname in UNIX Linux and Windows – Commands Tutorial

See to learn more ways to get IP address from hostname in UNIX and Linux.

Its common requirement to find IP address from hostname in Windows, Linux or UNIX operating system. Some times you want to know how to get IP address from hostname or sometime just hostname from IP address. Thankfully there are lot of commands in UNIX, Linux and Windows which can be used to get IP address from hostname and vice versa.

In this UNIX, Linux and Windows command tutorial we will see following command examples to get IP address :

1) hostname
2) ping
3) nslookup
4) ifconfig
5) ipconfig in windows

Important point to note is that these commands return internal IP address, if host is connected via LAN or in case you want to know IP address of localhost. By the way if you want to know external IP address of your computer, assigned by Service provider or ISP than you can go to any site like which display IP address for your computer.

Related UNIX command tutorials and examples :

ip address


Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

Leave a Reply

Your email address will not be published. Required fields are marked *