ARP Scan

sudo arp-scan -l
A much quicker and (not dirtier) option. use the man page for help. On linux/ubuntu you will need to `sudo apt-get -y install arp-scan`.
Sample Output
Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.6 with 256 hosts (	00:23:97:47:9d:45	(Unknown)	00:1f:33:e6:63:14	(Unknown)	38:e7:d8:bc:04:f2	(Unknown)	00:0c:29:8f:18:ad	VMware, Inc.	00:0d:4b:54:9b:01	Roku, LLC	00:24:a0:05:09:f2	(Unknown)

6 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.6: 256 hosts scanned in 2.245 seconds (114.03 hosts/sec).  6 responded

2011-02-21 21:58:27

2 Alternatives + Submit Alt

What Others Think

Problem being is that arp-scan isnt installed by default on a number of disto`s.
felix001 · 569 weeks and 4 days ago
neither *cough* is arping # arping -sh: arping: command not found
linuxrawkstar · 569 weeks and 4 days ago
PS- your loop is very graceful and I voted you up. Very clever scripting.
linuxrawkstar · 569 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: