You are not logged in.

#1 2021-11-01 21:02:31

hwallace
Member
Registered: 2021-08-30
Posts: 110

[SOLVED] can't ping hostname in hosts file

I have put hostnames to my hosts file but they are not resolving for ping

# cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
::1 localhost
127.0.1.1 arch 
meer 10.0.0.170
meer-ho 192.168.56.1
# ping meer
ping: meer: Name or service not known
# ping 10.0.0.170
PING 10.0.0.170 (10.0.0.170) 56(84) bytes of data.
64 bytes from 10.0.0.170: icmp_seq=1 ttl=64 time=8.33 ms
# ping meer-ho
ping: meer-ho: Name or service not known
# ping 192.168.56.1
PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
64 bytes from 192.168.56.1: icmp_seq=1 ttl=64 time=0.886 ms

Last edited by hwallace (2021-11-01 21:39:44)

Offline

#2 2021-11-01 21:19:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,243

Re: [SOLVED] can't ping hostname in hosts file

"man 5 hosts" or just look at your file.
The first three entries (not the comments…) are different from the last two, no?

Offline

#3 2021-11-01 21:39:11

hwallace
Member
Registered: 2021-08-30
Posts: 110

Re: [SOLVED] can't ping hostname in hosts file

seth wrote:

"man 5 hosts" or just look at your file.
The first three entries (not the comments…) are different from the last two, no?

Oh crap.

Need a break. Not even the first time I've done that.

Thanks seth

Last edited by hwallace (2021-11-01 21:40:08)

Offline

Board footer

Powered by FluxBB