How is that we can convert an IP to a domain name address on linux machine.
Suppose i always access my Pc with http://127.0.0.1 from the browser
I want to change this to my.com
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
I'n not sure exactly what you're asking, but if you just want to know how to look up a domain name associated with an IP address, you can use
dig -x to do a reverse DNS lookup:
$ dig +short -x 22.214.171.124 stackoverflow.com.
Note that this won't always work, because there may be multiple domain names pointing at a single IP address, and it's not always the case that every IP address has a reverse DNS mapping.
You should already be able to access that via http://localhost/, which is the standard name for 'this machine'.