Find out the IP of all devices connected to our local network

Ping command

It is possible that on some occasion you have wanted to know the IP of a device connected to the network, or perhaps just get a list of all connected stations to see for example if there are any intruders. There are several ways to do it, such as looking at the router, but without a doubt the fastest is by executing a command in the OS X Terminal.

Advanced commands

Thanks to UNIX power and from the utility of the broadcast address of our subnet, we can obtain a command with which we will obtain the list of connected stations almost instantly. The command makes a request for all network devices to respond by pinging, to later filter the information (grep) and display it more clearly and easily, as you can see in the screenshot.

The command in question is the following:

ping -c 3 192.168.1.255 | grep 'bytes from' | awk '{print $ 4}' | sort | uniq

Always assuming that your network is 192.168.1.X. If your network is 192.168.0.X or another modification you have to change the command to make it work, as is logical.

It is not something that you will use everyday or a utility that saves your life, but maybe sometime you need it (especially if you use DHCP) and then it will be great.

More information - What to do if your Mac doesn't use the maximum WiFi speed


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Rafael Lopez said

    It doesn't work, it gives me an error "grep: from ': No such file or directory"
    What am I doing wrong?

  2.   Anthony Martin Lopez said

    You have not done anything wrong, just the command as it is written does not work.

  3.   asdf said

    Change the quotes to single quotes

  4.   Joseph Higuera said

    Hello, if the command served me, thank you very much!

    ping -c 3 10.0.1.255 | grep 'bytes from' | awk '{print $ 4}' | sort | uniq

  5.   Facundo said

    The command:

    arp -a

    It does the same.
    Greetings.