Help!

how to resolve IP address to hostname

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> App Development RSS
Next:  [News] Microsoft takes another shot at JPEG with ..  
Author Message
arturo1957
External


Since: Mar 08, 2007
Posts: 1



PostPosted: Thu Mar 08, 2007 7:57 pm    Post subject: how to resolve IP address to hostname
Archived from groups: comp>os>linux>development>apps, others (more info?)

I am a Linux newbie but frequently use "ping -a <IP address>" to
return the hostname or NetBIOS name of a remote computer when I am
using any Windows/DOS machine.
Does "ping" in Linux have a similar switch or is there any Linux tool
with similar function to the Windows/DOS "ping -a" ?
Thanks, arturo1957
Back to top

External


Since: Jul 29, 2004
Posts: 957



PostPosted: Fri Mar 09, 2007 12:01 am    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"arturo1957" writes:

> I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux tool
> with similar function to the Windows/DOS "ping -a" ?

Try "host", comes with bind, sometimes packaged as bind-utils.

--
Måns Rullgård
mans@mansr.com
Back to top
02B12S
External


Since: Mar 09, 2007
Posts: 2



PostPosted: Sun Mar 11, 2007 5:00 am    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

try the command "nslookup" instead of "ping"

nslookup <ip address> returns the resolved name.

"man nslookup" for details

JJ
"arturo1957" wrote in message

>I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux tool
> with similar function to the Windows/DOS "ping -a" ?
> Thanks, arturo1957
>
Back to top
Jukka Aho
External


Since: Nov 28, 2006
Posts: 6



PostPosted: Sun Mar 11, 2007 11:00 am    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

arturo1957 wrote:

> I am a Linux newbie but frequently use "ping -a <IP address>" to
> return the hostname or NetBIOS name of a remote computer when I am
> using any Windows/DOS machine.
> Does "ping" in Linux have a similar switch or is there any Linux
> tool with similar function to the Windows/DOS "ping -a" ?

You can use the "host" command:

foo@bar:~$ host 204.152.191.5
Name: zeus-pub1.kernel.org
Address: 204.152.191.5

--
znark
Back to top
ellis
External


Since: Apr 02, 2004
Posts: 193



PostPosted: Sun Mar 11, 2007 12:00 pm    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
02B12S wrote:

>try the command "nslookup" instead of "ping"

Try something 21st century like host.

--
http://www.spinics.net/lists/
Back to top
Bjoern Schliessmann
External


Since: Mar 09, 2006
Posts: 78



PostPosted: Sun Mar 11, 2007 1:00 pm    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ellis@no.spam wrote:
> 02B12S wrote:
>
>> try the command "nslookup" instead of "ping"
>
> Try something 21st century like host.

If it's got to be new and cool, try dig.

Regards,


Björn

Xpost col.development.apps, col.networking

--
BOFH excuse #142:

new guy cross-connected phone lines with ac power bus.
Back to top
Unruh
External


Since: May 27, 2005
Posts: 2213



PostPosted: Sun Mar 11, 2007 7:01 pm    Post subject: Re: how to resolve IP address to hostname [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

ellis@no.spam () writes:

>In article ,
>02B12S wrote:

>>try the command "nslookup" instead of "ping"

>Try something 21st century like host.

What exactly is bad about the 20th century? ls, ping, login, find,..... are
all 20th century commands. Are we to throw them all out and not use them
because of that?
Back to top
tom_s



Joined: Mar 08, 2010
Posts: 1



PostPosted: Mon Mar 08, 2010 8:50 am    Post subject: [Login to view extended thread Info.]

The problem with all of your solutions is that they assume a DNS server on the network has the info. you are looking for. If you want to find the hostname of a Windows PC or a machine with samba installed say in a home network, you can query the device directly. First make sure the samba client is installed and then try:

smbclient -L a.b.c.d
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> App Development All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum