Monday, July 12, 2010

♦ What is my hostname ?

             Windows 7 Command line has a useful command "hostname" to find your hostname. try this command as shown below.


#1. use windows command "hostname" find host name.

c:\windows> hostname
              jupitor

#2. use windows command "ping" find remote pc name.

c:\windows>ping -a 72.30.2.43
Pinging ir1.fp.vip.sk1.yahoo.com [72.30.2.43] with 32 bytes of data:
Reply from 72.30.2.43: bytes=32 time=565ms TTL=49
Reply from 72.30.2.43: bytes=32 time=570ms TTL=49
Reply from 72.30.2.43: bytes=32 time=558ms TTL=49
Reply from 72.30.2.43: bytes=32 time=558ms TTL=49

Ping statistics for 72.30.2.43:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 558ms, Maximum = 570ms, Average = 562ms

#3. use windows command "ping" find your IP address' PC.

c:\windows> ping -a 192.168.0.6
Pinging SATURN [192.168.0.6] with 32 bytes of data:
Reply from 192.168.0.6: bytes=32 time<1ms TTL=128
Reply from 192.168.0.6: bytes=32 time<1ms TTL=128
Reply from 192.168.0.6: bytes=32 time<1ms TTL=128
Reply from 192.168.0.6: bytes=32 time<1ms TTL=128

Ping statistics for 192.168.0.6:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Solution: this command will return the computer name, quick and easy. relate command : ipconfig -all

# 4. use nbtstat : Find your hostname
 c:\windows> nbtstat -a [your ip address]
c:\windows> nbtstat -a 192.168.0.5
Local Area Connection:
Node IpAddress: [192.168.0.5] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    ---------------------------------------------
    WORKGROUP      <00>  GROUP       Registered 
    JUPITOR        <00>  UNIQUE      Registered 
    JUPITOR        <20>  UNIQUE      Registered 
    WORKGROUP      <1E>  GROUP       Registered 
    WORKGROUP      <1D>  UNIQUE      Registered 
    ..__MSBROWSE__.<01>  GROUP       Registered 

    MAC Address = 00-12-3F-B1-17-A5

Description: If  your IP address is 192.168.0.5 than you can get your hostname with the command "nbtstat - a [your ip address]" on above "jupitor" is hostname.

No comments:

Post a Comment