Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know there is a single line of a command and its arguments that can help display all computer IP addresses (those that are being used) on a LAN, and my computer is also a client, as one of those displayed, but I forgot. What is it?

share|improve this question

migrated from stackoverflow.com Dec 20 '12 at 23:16

This question came from our site for professional and enthusiast programmers.

I don't think this is possible in such a generic way. –  theglauber Dec 20 '12 at 17:41
You would have to ping-scan the local subnet and then use the arp -a command listed below. –  cpt_fink Jan 18 '14 at 7:08

4 Answers 4

You could do the arp -a command to show all ARP entries in the table about computers on your network.


share|improve this answer
It shows every system your computer is aware of/talked to - however, it may not be complete - I ran a quick experiment with arp -a and it didn't show one or two of my systems till I pinged it. –  Journeyman Geek Jan 18 '14 at 5:46
Ya, like the link I posted said, it won't show everything unless it has them stored in the tables so so machines won't be shown but it does do a pretty good list. –  GigabitP Jan 18 '14 at 17:35
Welcone to Stack Exchange, Gigabit Pony! When a link makes up most of your answer, you should always quote the important parts in case it dies later. See also the howto on writing good answers. –  Blacklight Shining Jan 23 '14 at 4:09

ipconfig /all (use forward slash, not backwards)

share|improve this answer
echo ls %USERDNSDOMAIN%|nslookup
share|improve this answer
Welcome to SU. Can you please elaborate on what the command do? –  Martin Prikryl May 18 '13 at 8:29

There is the net view /all command which will list all of the computer names that are connected to the same LAN.

From that you can retrieve the individual IP addresses using the nslookup <computer name> command or write a batch script to do it for you.

Here is an example batch I threw together to illustrate.

@echo off
setlocal EnableDelayedExpansion
set "xNext="
set "xComputer="
for /f %%A in ('net view /all') do (
    set "xComputer=%%~A"
    if "!xComputer:~0,2!"=="\\" for /f "tokens=2,* delims=. " %%X in ('nslookup %%A') do (
        if "!xNext!"=="1" (
            echo.!xComputer! = %%X.%%Y
            set "xNext=0"
        if "!xComputer:~2!"=="%%~X" set "xNext=1"
share|improve this answer

Your Answer


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

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