Linux, Ping and hostname

If I ping an IP, it will return the IP

If I ping a hostname, it will return the IP

Is there a command to ping (or something like that) an IP, and have the hostname that corresponds to that IP be returned ?

Thanks
Los Angeles1Asked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:
Yes, use

host <ipaddress>

or

host <hostname>

Omit < >  

:-)
0
 
Patrick BogersDatacenter platform engineer LindowsCommented:
Did you try dig (or dig -x)?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.