Resolving Linux Hostnames from CMD

ieuxxxxx
ieuxxxxx used Ask the Experts™
on
Hi folks,

This has probably been answered before but I couldn't find it anywhere.

I am looking for a switch or a small program that will allow me to resolve hostnames of Linux Machines from a Win OS.

Thanks all.

Party on,

ieuXXXXX
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The windows version of bind has the host and nslookup utilities.

Bob Gunzel

Commented:
do those names exist in the dns server or hosts file?

you can also use ping and ping -a for the reverse resolution.:)

Author

Commented:
in Linux you have a host name and a DNS name. (confusing enough) but is there a way of find ing out what name the DNS is.
I have assigned a Static IP address to a machine but need to know if its DNS name is different.
Sorry about not been straight from the start.
 

Party on,


ieuxxxxx
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Commented:
you will set that dns name in your dns server
or in the HOSTS file of your windows machine.
in your linux, check /etc/hosts and please write it here...

nslookup name-of-linux-box
nslookup IP
I think what your asking is can you do something like an nbtstat -A #.#.#.# to figure out the machine name.  The answer is, yes and no.  No, there is nothing in linux to do this.  However, if your using a linux machine on a windows network, there is a good chance that it's running smbd (samba daemon).  If so, the nbtstat command will work.  Understand though that the name that smbd reports is just the Window network name of the server and that doesn't have to match the linux hostname.  It likely does, but it's not a guarantee.

Author

Commented:
Thanks for that guys and quietyakr seems to have hit the nail on the head there. Ta very much. will try that.
Kelly BlackSenior Linux / DBA / DEVOPS

Commented:
Install Perl.

:)
"nbtstat on Linux" is nmblookup
ieuxxxxx:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Commented:
i agree with my comment...

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept quietyakr3's comment as answer.
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

troopern
EE Cleanup Volunteer
my suggestion is as valid as quietyakr3's one
so either split points, or 0 points PAQ

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between ahoffmann & quietyakr3.
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

troopern
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial