LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   which config file to set: this name <=> this ip (https://www.linuxquestions.org/questions/linux-networking-3/which-config-file-to-set-this-name-%3D-this-ip-438070/)

kloss 04-23-2006 01:39 PM

which config file to set: this name <=> this ip
 
Hello all,
I would like to use names instead of IPs. For instance:
"ping familypc" instead of "ping 192.168.13.37 or "ssh a_user_name@remote_computer" instead of "ssh a_user_name@ip.not.on.LAN".
I am looking for the configuration file where I can set up these equivalences. I am sure that it exists (hidden somewhere under /etc ...) :)
Thanks in advance
/kloss

zaichik 04-23-2006 01:55 PM

You're looking for /etc/hosts, which would have entries like

Code:

127.0.0.1    localhost
192.168.13.37    familypc

and so on.

kloss 04-23-2006 02:23 PM

Quote:

Originally Posted by zaichik
You're looking for /etc/hosts, which would have entries like

Code:

127.0.0.1    localhost
192.168.13.37    familypc

and so on.

Yes, it was this file! Thanks a lot!
Bye


All times are GMT -5. The time now is 05:43 PM.