Computer NetworksNETWORKS

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

See http://javarevisited.blogspot.com/2011/09/find-hostname-from-ip-address-to.html 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 ipchicken.com which display IP address for your computer.

Related UNIX command tutorials and examples :
http://javarevisited.blogspot.com/2011/06/10-examples-of-grep-command-in-unix-and.html
http://javarevisited.blogspot.com/2011/03/10-find-command-in-unix-examples-basic.html
http://javarevisited.blogspot.com/2012/03/10-example-of-chmod-command-in-unix.html

source

ip address

Alice AUSTIN

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 *