I meant you can EITHER use the numeric IP address anytime you need to address a device, OR add the IP addresses --> name translations into your /etc/hosts files in which case you will be able to refer to the hosts by their unqualified names in the absence of any DNS / mDNS (Avahi) service e.g.
Code:
steeldriver@lap-t61p:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 lap-t61p
# added local hosts IPv4 lookups so I can accesss them without DNS or mDNS/Avahi
192.168.1.65 htpc-01
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
steeldriver@lap-t61p:~$
Then I can just do
Code:
steeldriver@lap-t61p:~$ ping -q -c1 htpc-01
PING htpc-01 (192.168.1.65) 56(84) bytes of data.
--- htpc-01 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 7.459/7.459/7.459/0.000 ms
Bookmarks