How to find IP address of a machine on network?

NoOp glgxg at
Fri Jan 16 19:29:38 UTC 2009

On 01/16/2009 09:28 AM, Chris G wrote:
> I have just installed ubuntu onto a machine and have connected it to
> my LAN.  The router provides DHCP and the new machine is up and
> running on the network.
> How do I connect *to* the machine?  I need to know its IP address and,
> as there are a few devices which get their address by DHCP it's not at
> all obvious what the machine's address is.
> Eventually I will probably give it a fixed address (for this reason
> among others).

sudo apt-get install nmap

and scan for machines on your network. Example:

$ sudo nmap -sP |grep up
Host appears to be up.
Host appears to be up.
Host main ( appears to be up.
Host main3 ( appears to be up.
Host appears to be up.
Nmap done: 256 IP addresses (5 hosts up) scanned in 2.488 seconds

In the above example: is a router is a router [1] is a WinXP machine is this machine

[1] machines on the other side of 108 aren't shown as they are on a
different subnet & I only scan the in this example. You
can google for nmap to find out how to scan outside of your subnet. Just
be careful that you don't go scanning too far as some/many/all networks
find scans to be intrusive.

If you want details (MAC address etc), then use the '-vv' mode:

$ sudo nmap -vv -sP

and you'll get the MAC addresses for the hosts that are up.

If you prefer a GUI frontend to nmap, you can try zenmap:

sudo apt-get install zenmap

Disclaimer: I've not used zenmap (yet), but added info is here:

More information about the ubuntu-users mailing list