Apply hostname, access from Windows

Hello all. I've just installed and started using Fedora Core 2 on a second machine here and I'm trying to learn to use it. You'll have to excuse my "n00bish" questions :)
Right now I'm trying to figure out how I can set a hostname for the machine so I can access it from my Windows XP box. It's on the LAN and the machines can see each other via their IP addresses, but I'd like to be able to use their hostnames.

What do I need to do with the linux box so that it can both see and be seen by Windows using a hostname?

Thanks!

-------------------------------------------------------------------

Hostnames can be set up using /etc/hosts:
ip_address xpmachine'shostname
ip_address linuxmachine'shostname

It can be as simple as that, at least from the Linux side.

If you want to see it by hostname on XP, you'll have to set it up on that side, unless you have a name server running on the Linux side (and you are referencing it on XP), and you have that Linux machine defined on the name server side.

Good luck.

-------------------------------------------------------------------

Ah, so you're talking about using something akin to the HOSTS file in Windows. That would probably work pretty well.
I was thinking though more along the lines of having the Linux machine use NetBIOS to determine names on the network similar to Windows. Is there any way to do this?

Something I just saw has me wondering about this. When I try to ping the XP machine's hostname, Linux tells me the host could not be found, but at this same time I can mount a share on the XP machine using it's hostname. Why can it find the machine to mount the folder but not when doing a ping?

Thanks.

-------------------------------------------------------------------

Yes, it's like the HOSTS file.
When you say it can find the hostname when you mount an XP share in Linux but not when you ping, how, exactly, are you mounting this share (giving me a better idea as to how it knows)?

As far as NetBios is concerned, I've had no need or desire to pursue its use on Linux, so I can't tell you whether or not an equivalent is available.

-------------------------------------------------------------------

I'm mounting the share on my Windows machine like this:
mount -t smbfs //Q/music /mnt/music

Q is the name of my Windows machine, and that command works just fine. However, if I try to:

ping Q

It says the host couldn't be found.

Regarding NetBIOS, I wasn't sure if something like that was used in Linux. Is there a Linux alternative? How does one machine find another if it's not in the hosts file (ie: in a big corporate network)?

Thanks again.

-------------------------------------------------------------------

If you install Samba (smb), the open-source version of a windows file-sharing server, it usually comes with a netbios name server. You can set the NMB (netbios) hostname in the config file; then your windows machine will think your linux box is a windows machine on its network.
Getting your linux box to resolve windows hostnames is a little more complicated. The smb mount option can use netbios name resolution because its built-in; the ping command (and linux name resolution in general) has no such capability.

Windows networks mostly use netbios for name resolution; everyone else in the universe uses DNS. You could go to the trouble of installing a dns server (usually BIND), but if you've got a relatively small LAN, it would probably be a lot easier to just edit the /etc/hosts file.

-------------------------------------------------------------------

Ah, I get what's going on now. Didn't realized that Samba was working with NetBIOS in the background.
Thanks!

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Home Index
Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.