Finding the ip address of another computer on the network?

76,949

Solution 1

you could try nmap, if you don't have it, it can be installed via the following :-

sudo apt-get install nmap

you can then scan your network by issuing :-

nmap -sP 192.168.1.0/24

obviously change address range if your network differs

Solution 2

Modern releases of Ubuntu use avahi, so one could also use avahi-discover

sudo apt-get install avahi-discover

and run with:

avahi-discover

this allows you to view all the machines on the network and see the IP address, MAC address and services running on these machines.

Alternatively one could use:

avahi-browse -rat

Solution 3

Just as apacheuk mentionned, using nmap is a great and efficient way. Actually the -O option enables you to get additional informations such as the MAC address, the open ports, the OS type, the distance (in hops):

nmap -O 192.168.1.0/24

Please note that you main need to be logged in as root or sudo in order to be able to do that.

Share:
76,949

Related videos on Youtube

Timothy
Author by

Timothy

GNU /Linux Open source advocate. Ubuntu User Python programmer

Updated on September 18, 2022

Comments

  • Timothy
    Timothy over 1 year

    Is there a program which can tell me the ip address of a computer when is connected to my network? A list of names or ip addresses.

    For example when my wife is on my main desktop computer I can either go on another desktop or laptop and work. However I don't know the ip address of the computer she's on it's dhcp and no static ip addresses. I would like to ssh into the main desktop and work on it. Sometimes I have asked her if I could get on for a minute to get the ip address. From a terminal I do an ifconfig and get the address. I could get it from the router too but that is requires logging into the router. There must be some short command I can run? All the computers are running Ubuntu and samba is not installed. Once I know the ip address I can ssh into the main desktop.

  • Timothy
    Timothy over 11 years
    Thank you, I never knew about this command. I installed it and I like it. It gives you a lot of information. Very useful.
  • John S Gruber
    John S Gruber over 11 years
    Nice answer here.
  • Timothy
    Timothy over 11 years
    Thank you, I installed nmap and tried it works. Does alot Just was reading about nmap in wikipedia. Powerful stuff.