Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What are some solutions to access Windows by its computer name from Linux and Mac using TCP/IP. That is, from terminal I want to be able to ping my Windows PCs using its host name.

My setup is:

  • Various machines running Ubuntu, Windows XP and OS X.
  • Networked using a consumer grade wireless router which provides DHCP.
  • The only DNS is the ISP's, which resolves Internet names and not local host names.

The Windows machines can ping each other by name. The Ubuntu and OS X machines can only ping Windows by IP address (name doesn't work).

share|improve this question

4 Answers 4

up vote 2 down vote accepted

I ended up going with multicast DNS by installing Apple's Bonjour. Now I can address the Windows PCs by using the address hostname.local from the OS X and Linux machines.

share|improve this answer

you can edit your /etc/hosts file to add the ip addresses to internal DNS support.

Obviously a sync solution (meaning using a DNS server in your router or setting up a DNS server on one of your boxes that the router points to)

share|improve this answer

Check to see if your router supports DNS forwarding. Often DNS forwarders will serve windows hostnames if they come through as a DNS request.

You might also make sure that Samba is fully installed on the linux machines and enabled on the Mac.

share|improve this answer
    
DNS Forwarding is a feature that allows DNS requests to be forwarded to a specific set of downstream servers rather than using root hints for unresolvable names. It doesn't have anything to do with local hostnames. –  MDMarra Jun 7 '10 at 2:06

Adding wins to the end of the hosts line in the file /etc/nsswitch.conf will make Linux use the Windows network browsing thingy for name resolution.

(You will need to have the winbind package installed for it to work. It will probably already be installed.)

share|improve this answer

Your Answer

 
discard

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.