Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 807
  • Last Modified:

Linux ping with computer name

hi to all,
i have a centos - linux computer. i can ping it from another windows computer with ip but i can't ping it with name. i've set host name but the problem still go on.
what can i do?

2 Solutions
It sounds like you don't have a DNS entry for this machine on whatever DNS server your Windows machine is using. You need DNS setup in order to resolve the name to the IP.

Is this at your home? You are likely using the DNS of your ISP, in which case you won't be able to control it.

You could add an entry into your windows hosts file to manually control the resolution of the name.
The host file is located in C:\windows\system32\drivers\etc, and is just a file called hosts. Open this up inside notepad, and at the bottom of the file you can add the IP and hostname of the centOS machine that you want to resolve on your windows machine.
erenpasaAuthor Commented:
hi sadburger,
the machine will be server. hosts file solution not enough for me. because alot of machine in my network. here is a company. i can ping windows os with computer name.there is problem just the linux.
What are you using for DNS on your machines? Do you have control of the DNS server?
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Hugh FraserConsultantCommented:
Are you using a static address for this server, or DHCP? If you're using DHCP, it may be that you need to include in the lease request a suggestion for the name of your machine. Try to do a lookup of the address to see what name gets returned.
You're probably looking to install and configure Samba

Morne LateganCommented:
Yip, samba will make the name available if you don't have dns.

Windows hosts have CIFS networking by default, and register themselves on the network through DNS in an active direcrory setup, wins in a domain setup, or netbios in a workgroup setup. That is why machines know the names of other machines on the network even without DNS.

In order for Linux to behave the same, you need CIFS networking on Linux, which is provided by samba.
erenpasaAuthor Commented:
i give 450 points to tillgeffken because he answered first.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now