Linux ping with computer name

Posted on 2009-05-01
Last Modified: 2013-12-16
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?

Question by:erenpasa
    LVL 5

    Expert Comment

    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.

    Author Comment

    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.
    LVL 5

    Expert Comment

    What are you using for DNS on your machines? Do you have control of the DNS server?
    LVL 12

    Expert Comment

    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.
    LVL 9

    Accepted Solution

    You're probably looking to install and configure Samba
    LVL 7

    Assisted Solution

    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.

    Author Closing Comment

    i give 450 points to tillgeffken because he answered first.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now