Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

If I look into /etc/hostname/ I can see the hostname of my device. This is however not the name that shows up when I use nslookup on our network. How do I tell the DNS server which name it should use?

To clarify I am on a small local network.

Edit: I think I have to explain this a little further.

I have a file /etc/hostname with only one line:


We have a LAN that has the name our_network.local.

I was expecting if there isn't any kind of conflict, the nameserver would create the name my_hostname.our_network.local, but when I issue the command nslookup on my ip-address, the name is not found.

share|improve this question
Do you have permissions to administer the DNS server on the LAN? And what DNS server software do you use? – maxschlepzig Aug 30 '11 at 21:01
@maxschlepzig: okay, I see. That's probably where the confusion is coming from. I was hoping I could handle that from the client site and there would be a standard way of doing it. No, I have to negotiate with our admin, I think. – Lucas Aug 30 '11 at 21:13

The tool you can use to update dynamic DNS information is nsupdate, which usually comes with bind-tools package.

If you have or want to set up a static DNS, you should get familiar with a classic tool for setting up DNS: bind. There are many online tutorials for it - like this or this one.

Notice that it is not a common situation for "standard user" to be able to edit such information, unless you have your own DNS server.

share|improve this answer

Your domain name is ultimately determined by the global DNS system. A registrar, such as Network Solutions, assigns a new name to you in the top level domain (TLD) that you request (if it's available). You must also supply a pair of DNS servers so the world can find out your global host names. Or the registrar can provide it as a service.

Those DNS servers can also define sub-domains and host names, that the domain administrator can define. Your host can be configured with this domain name, or it can be assigned dynamically by the DHCP protocol. If it is not supplied, and your host is using the zeroconf system, then it will assign itself the .local domain name. This gives it something to work with that is always the same.

With dynamic DNS and DHCP, your host can supply its name in the DHCP request and the DNS server will then be updated to associate that name with the IP address that it gave you.

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.