Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use an alias for a remote host. For example, when instead of "ping" I want to do "ping giraffe", but only when I do it from my own machine. I am able to do this for raw IP addresses by adding an entry in /etc/hosts (ie "123.456.1.0 giraffe"), but it does not seem to work for host names.

share|improve this question

You can add to the DNS suffix list. You have to do this to each client individually. HOWEVER, you can also set your DHCP server to add entries to the DNS suffix list, which is a way of doing individual client updates in a centralized fashion.

share|improve this answer

If your hosts file is not working it may be because your /etc/nsswitch.conf file has dns listed before hosts

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.