PDA

View Full Version : [ubuntu] Cannot ping by computer name, only IP address



riksweeney
January 4th, 2009, 02:11 PM
Hi,

I'm trying to ping my other Ubuntu computer by its name, I can only only ping it by IP address. i.e.


ping ubuntucomp

ping: unknown host ubuntucomp

ping 192.168.0.5

PING 192.168.0.5 (192.168.0.5) 56(84) bytes of data.
64 bytes from 192.168.0.5: icmp_seq=1 ttl=64 time=1007 ms

What do I need to do to allow pinging by name?

Thanks

Richard

Edit:

I've found a solution to this, nevermind :)

Iowan
January 4th, 2009, 04:47 PM
As this is a frequent question, please post your solution. :D

ajmc
January 3rd, 2011, 12:05 AM
can you post how you solve the problem?

spiky001
January 3rd, 2011, 12:13 AM
If you add an entry to /etc/hosts ipadd then next to it name of pc, use
gksudo gedit /etc/hosts