Correct hosts file for ipv6 hostname

slumer

New Member
Joined
Apr 12, 2021
Messages
2
Reaction score
0
Credits
17
I try to ping my hostname by ipv6 :

ping6 linux

And it cant get resolved.

Whats the correct form to add it in /etc/hosts . Should i add/edit "::1 linux" ?
Also is the same for debian ?
 


It should look like this in /etc/hosts
Code:
::1        localhost
Try running this instead.
Code:
ping -6 ::1
 
Then make it look like this.
Code:
::1        localhost linux
Then ping it.
Code:
ping -6 linux
 
This is what my /etc/hosts looks like.
Code:
127.0.0.1    localhost
::1        localhost ip6-localhost ip6-loopback
ff02::1        ip6-allnodes
ff02::2        ip6-allrouters

127.0.1.1        raspberrypi
 

Staff online

Members online


Top