Find Computer Name in a Network
-
I am working in Ubuntu Machine. I connected in 192.168.x.x network
I need to find the computer name since i know the IP of the system but I need to know the computer name and users in his computer.The other computer is Windows 7 machine.
How to do this ?
-
nslookup ipaddress
So if the IP address of the machine is 192.168.0.20 you would use...
nslookup 192.168.0.20
-
Keep in mind this is querying DNS, of course. The actual name of the machine itself can only ever be found by logging into the machine itself and asking it.
-
Since it can provide the name and address of the machine when it is connected in the domain.
-
@Lakshmana said:
Since it can provide the name and address of the machine when it is connected in the domain.
There is no concept of "connected to a domain" in DNS. It is simply a look up table. You ask it to lookup the mapping, it returns it. It doesn't care if the information is correct, current or if the machine has ever existed.
-
ok.I understood
-
@scottalanmiller what file on Ubuntu do you look at to get the name of the machine?
On Windows 7, open the control panel > System the name is listed half way down.
-
@Dashrender said:
@scottalanmiller what file on Ubuntu do you look at to get the name of the machine?
Why get that complicated? Just ask the machine its name.
uname -n
or
hostname
UNIX people know to do the former rather than the more obvious later as the former command, uname, is an "always safe" command no matter what typo follows it. Hostname is safe when run without anything after it but if you bump a key after typing the command you might accidentally rename your running system which could cause issues if anything depends on the name.