Is there a way to scan an entire network using nmap?

What I want to do is scan my network for all the devices that are currently connected to it.


Scan a network and find out which servers and devices are up and running:

nmap -sP

Scan a single host:


Scan multiple IP addresses or subnets:


Scan by excluding a host:

nmap --exclude

That will exclude the host while scanning.

Fast nmap scanning for a network range:

nmap -F

To see packets sent and received received using nmap:

nmap --packet-trace

Scan for a port:

nmap -p 22

Scan for multiple ports:

nmap -p 80,22,21,111

Scan all ports using nmap:

nmap -p "*"

I hope that will help you. If you need to know more just run the command:

man nmap
| improve this answer | |
  • Thank you very much my friend this has helped me tremendously. Just to be clear is that IP address a universal network IP or what? Just curious lol. – Fofaster Nov 16 '13 at 5:19
  • No its your local Network , Network Address – Babin Lonston Nov 16 '13 at 5:33
  • 2
    Option -sP is deprecated. The new equivalent is -sn. – H2ONaCl Mar 2 '17 at 21:04
  • 2
    sudo arpscan list is probably worth looking at to if you're just wanting a list of hosts/clients in the network you're connected to. – pbhj Nov 2 '17 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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