How to find IP address of a machine on network?

Neil Cherry ncherry at linuxha.com
Fri Jan 16 18:09:59 UTC 2009


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).
> 


>From the command line:

ifconfig

Output will look like this:

eth0      Link encap:Ethernet  HWaddr 00:0D:B9:13:14:38
          inet addr:192.168.24.99  Bcast:192.168.24.0  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:10 Base address:0x1000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:294 errors:0 dropped:0 overruns:0 frame:0
          TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:30124 (29.4 Kb)  TX bytes:30124 (29.4 Kb)


Note that this machine does not have it's WiFi enabled. This machine's
IP address is 192.168.24.99 (eth0). You could get fancy by using
regular expressions (egrep) but that might seem a bit scary for the
uninitiated.


Hmm, odd that machine appears to have broken counters, oh well I'll
fix that later.

-- 
Linux Home Automation         Neil Cherry       ncherry at linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
Author of:    	Linux Smart Homes For Dummies




More information about the ubuntu-users mailing list