How do I resolve an hostname to an ip address in linux?



  • There are various ways to do this. Just listing two here.

    using dig command.

    $ dig +short www.iucnredlist.org
    

    Using host command. Needs some filtering to strip out only the IP address.

    $ host www.iucnredlist.org
    

Log in to reply
 

© Lightnetics 2020