I'm using Terminal on a Mac running OS X Yosemite. Wondering how I can assign hostnames so that I can run telnet instead of using the ip address.


Use the '/private/etc/hosts' file. Example (works in place of a DNS resolver):

xxx.xxx.xxx.xxx    hostname.domain hostname
xxx.xxx.xxx.xxx    hostname2.domain2 hostname2
xxx.xxx.xxx.xxx    hostname3.domain3 hostname3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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