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?

2 Answers 2


Avahi tools

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

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

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

    enter image description here



A good tool to scan all hostnames on a network is nbtscan.

$ nbtscan                                                                                                  
Doing NBT name scan for addresses from

IP address       NetBIOS Name     Server    User             MAC address      
------------------------------------------------------------------------------     Sendto failed: Permission denied    CLEMENTINA          <server>  CLEMENTINA          00:00:00:00:00:00    CLEMENTINA          <server>  CLEMENTINA          00:00:00:00:00:00   Sendto failed: Permission denied

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

sudo apt-get install nbtscan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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