Display host IP address in Linux

Is there a file in linux where the IP can be mapped to the host name. Please tell me the way

As in Windows: by changing the host file we can map the static ip to the host name.

+4
source share
1 answer

Do you mean the file / etc / hosts ?

/etc/hosts 

Typical entries might look like this:

 127.0.0.1 localhost 127.0.0.1 sagan 192.168.1.87 bohr 
+15
source

All Articles