-   Linux - Newbie (
-   -   How can I ping my linux system by host? (

hydro 02-20-2003 12:25 AM

How can I ping my linux system by host?
Hey guys

i have two entries in my etc/hosts file localhost Apophis

Apophis(stargate fan) is the hostname of the linux system and that ip is the ip the router gives it

with all my windwos system, i can ping them all by using there host name "ping comp-bla"

how can i do the same for linux?

i look at my router dhcp table and nothing is set for

micxz 02-20-2003 12:39 AM

Use the ping command:

mars:/home/micxz # ping
PING ( from : 56(84) bytes of data.

--- ping statistics ---
5 packets transmitted, 0 received, 100% loss, time 3999ms

hydro 02-20-2003 01:35 AM

read the title man

i said by hostname

not ip :/

PTBmilo 02-20-2003 03:07 AM


/home/milo [201]> ping Apophis
and make sure that you /etc/nsswitch.conf file has:

hosts:          files dns
The /etc/hosts file has this syntax:

IP_address canonical_hostname aliases

example(from 'man hosts'): localhost foo bar

hydro 02-20-2003 04:19 AM


I need my linux system to register its hostname with the router dhcp.

so i can ping it using its hostname from other pcs on the network

PTBmilo 02-20-2003 04:31 AM

I thinnk you might need BIND.... dns server.

micxz 02-20-2003 04:48 AM

I've got to learn how read':

Mine reads: localhost mars.local mars

Mars resolves and mars.local as well' Hope this helps'

All times are GMT -5. The time now is 06:30 PM.