Super User is a question and answer site for computer enthusiasts and power users. 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 have Ubuntu running in VMware Player. I am able to access an Apache instance on this VM by using the IP address but not by machine name.

How do I make the name of the VM visible to the host? How do I add the machine name to my DNS? I am running within a Windows network.

share|improve this question

migrated from Sep 5 '10 at 3:53

This question came from our site for professional and enthusiast programmers.

Why the close vote? If we can discuss editors, furniture and interviews then why can't we discuss networking? FYI, I'm trying to set up SVN on the VM and access that from the host. Does that make it "programming related" enough? – Agnel Kurian Apr 22 '09 at 10:50
I agree. I don't know why we shouldn't talk about these topics here on SO as well. Networking for many programmers is an important part of what they have to deal with. – Martin C. Apr 22 '09 at 10:58
@martin it's a slippery slope, but definitely not programming related. – saschabeaumont Apr 22 '09 at 23:51
@Roger Pate: I believe the title: "Make VM Machine name..." would make it more obvious that we're talking about VMs here. Also, this is more Google friendly than "guest" to those who are searching for VM related quries. – Agnel Kurian Aug 27 '10 at 8:39
@Vulcan: I was avoiding "Virtual Machine Machine" (from "VM Machine"), but if there's a tweak you'd like to apply, feel free. – Roger Pate Aug 27 '10 at 9:42

Put it in either DNS or in /etc/hosts.

EDIT: If the host is a Windows machine, put it in C:\WINDOWS\system32\drivers\etc\host.

Both are bascially the same syntax, which is

IP hostname1 hostname2 hostname3 ...

e.g. localhost localhost.mydomain.tld
share|improve this answer

Or use mDNS, giving your name an automacic .local domain.

apt-get install avahi

or see:

share|improve this answer

If the host is Windows: Go to C:\Windows\System32\drivers\etc\ open file "hosts" and add a line:

IP Address Hostname

example: ubuntu

If the host is Linux

sudo vi /etc/hosts

Then the same.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .