The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Aliases via the ‘hosts’ file

Contributed by: Johan Jansson
This tip is valid for: Both BeOS and Haiku

If you find yourself writing an internet address often, you can alias it to a simpler name. For example, I telnet quite often to a server at my old university: mumrik.nada.kth.se. I have aliased this to “mumrik”, so instead of having to type “telnet mumrik.nada.kth.se”, I can now type “telnet mumrik”. This alias will work with any program using internet addresses, NetPositive too, though it may be easier to make a bookmark there. Here is how you do it:

Edit the file /boot/beos/etc/hosts, create it if it isn’t there already.
Add entries with this format:
111.111.111.111 machine.domain.top alias

For example, my mumrik alias looks like this:

130.237.226.10
mumrik.nada.kth.se mumrik

I think you must have an endline after every entry, or it won’t be recognized.

Posted in Networking

One Response

  1. Ziusudra

    Currently on Haiku the path for this file is /boot/common/settings/network/hosts