Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

On windows networks, I'm used to browse my workgroup using "view workgroup computers".

Now I'm on a linux only network. I now I can use samba and just do the same, but is there a way to achieve the same thing without relying on the microsoft wins/browser protocol?

Is there any linux software which can be used to maintain a list of computers, even if they are on different subnets?

Thank you for your answers.

share|improve this question
up vote 5 down vote accepted

The best way to do network mapping on Linux is to use 'nmap', which is literally, network mapper.

You can do it one of two ways. The first is a ping scan, which will just send a ping to IPs and report back the IPs that respond. For instance:

msimmons@msimmons-laptop:~$ nmap -sP

Starting Nmap 4.53 ( ) at 2009-12-12 07:52 EST   
Host Wireless_Broadband_Router.home ( appears to be up.
Host appears to be up.
Host appears to be up.
Host msimmons-laptop.home ( appears to be up.
Host appears to be up.
Nmap done: 254 IP addresses (5 hosts up) scanned in 0.869 seconds

That works well enough, but lots of machines have firewalls setup to block incoming ICMP packets, and so won't reply to a ping request.

If it's an all-Linux network, you can scan for port 22, which is the ssh port. That's done like this:

root@msimmons-laptop:~# nmap -sS -p 22 | grep -B3 open | grep ports

Interesting ports on
Interesting ports on
Interesting ports on msimmons-laptop.home (

You might want to notice that I've parsed the nmap output through grep a couple of times. By default, the output is verbose, and nmap reports on every host it finds, whether or not the port is open. Since I only care about hosts with that open port, I grepped out the lines that reported the IP, only if the result was that the port was open.

Also, I performed a "syn" scan, which only initiates 1 step out of the three that comprise the TCP handshake protocol. This means that it's able to identify open, closed, and filtered ports. It also requires root privileges to create the raw socket necessary to perform this type of scan.

Once you've done this, go to the physical switch and check the lights. If there are more lights lit than hosts who responded, investigate by following the cables.

share|improve this answer

You could use avahi-browse or mdns-scan to list all all computers that have avahi-daemon running (Avahi is an open-source implementation of Apple's Bonjour multicast DNS).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.