Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 ssh into the machines on my network using hostname.local. I've forgotten the hostname for one of the machines. Is there a command I can issue from one machine that will broadcast a request for and display all the hostnames for the machines on my lan?

share|improve this question
up vote 2 down vote accepted

A good tool to scan all hostnames on a network is nbtscan. Their website is below if you would like more information:


You can install it in the Software Center by searching for 'nbtscan', through their website, or via Terminal:

sudo apt-get install nbtscan
share|improve this answer

Avahi tools

There also are tools from the Avahi package to list services.

  • avahi-browse (from avahi-utils Install avahi-utils)
    Command line tool that browses the network for any services used by Avahi.

    avahi-browse -at
  • avahi-discover Install avahi-discover
    Is a GUI to display all Avahi services available:

    enter image description here

share|improve this answer
Thank you! I suspected avahi might be a solution. – naftalimich Jul 9 '12 at 19:38

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.