Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

In my work there is a lot of computer and I want make a joke. I can close computer over the network but finding IP addresses is hard to me.

How can I easily find all online IP adresses from 192.168.1.aa to 192.168.1.zz?

share|improve this question
try angry ip scanner – Web-E Dec 2 '12 at 11:37
possible duplicate of How to find unused IP Address on a network? – Lekensteyn Dec 2 '12 at 11:50

4 Answers 4

up vote 35 down vote accepted

Generally, nmap is useful to quickly scan networks.

To install nmap, entersudo apt-get install nmap.

Once it is installed, enter nmap -sP

This will show you which hosts responded to ping requests on the network between and

share|improve this answer
Not all hosts respond to pings. ARP is the way to go, at least in IPv4. – Marcin Kaminski Dec 2 '12 at 15:28
thats enough for me and it works on internet – user84277 Dec 2 '12 at 19:35
is it just my computer, or does this command take forever to run? – JohnMerlino Apr 14 '14 at 0:18
Note, to speed up nmap scan you should add -T4 (speed) and -n (numeric only) flags. – Serg Aug 7 at 21:55

If all the computers in your network are Ubuntu or any other distribution that makes use of avahi-daemon (DNS-SD), you can get a detailed list of them (with hostname and IP address) by doing:

avahi-browse -rt _workstation._tcp

If you want to know all the IP addresses used in your network, you can use arp-scan:

sudo arp-scan

As it is not installed by default, you'll have to install it with sudo apt-get install arp-scan. arp-scan send ARP packets to the local network and displays the responses received, so it shows even firewalled hosts (that block traffic based on IP packets).

share|improve this answer
This command is definitely better than the one above. Running nmap took ages, but this one replied instantly with the nodes in the specified network. – JohnMerlino Apr 14 '14 at 0:19

Netdiscover can be your answer.

To install via terminal:

sudo apt-get install netdiscover

example usage :

sudo netdiscover -r -i wlan0

An IP with MAC Addreses will show on your terminal. See the screenshot

enter image description here

hope help you


share|improve this answer

nmap would be my #1 choice, but what if you don't have it ? The DIY way would be with a ping script that goes through each possible ip address on the network manually. What we have here is just while loop, where we set last number in the address, make silent single ping to the address, check if the command succeed or not (and if it did succeed,then host is obviously up ), and printf statement. Quick and dirty way, took me about 10 mins to write it, but runtime might be a bit slow,though.

# set -x

while [ $NUM -lt 256  ];do 
    ping -q -c 1 192.168.0.$NUM > /dev/null 
    RESULT=$(echo $?)
    if [ $RESULT -eq 0 ]; then 
        printf 192.168.0.$NUM"\n"
    NUM=$(expr $NUM + 1)
share|improve this answer
I like this kind of solution – Szenis Aug 7 at 21:50

Your Answer


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