![Al ejecutar "hostname -i" ya no se muestran todas mis direcciones](https://rvso.com/image/885957/Al%20ejecutar%20%22hostname%20-i%22%20ya%20no%20se%20muestran%20todas%20mis%20direcciones.png)
Cambié mi nombre de host en Ubuntu 16.04.1.
Ahora ejecutar hostname -i
elimina la mayoría de mis direcciones excepto una.
En cambio, su salida es:
127.0.1.1
Solía ser: ipv6_address%eth0 ipv6_address%eth1 ipv6_address%2 ipv4_address ipv4_address ipv4_address ipv4_address
.
/etc/nombre de host:ubuntu-rany-01
/etc/hosts:
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 rany-01 rany-01
127.0.0.1 localhost
# 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
ff02::3 ip6-allhosts
¿Hay alguna forma de recuperar mis direcciones?
Respuesta1
Esto se debe a que en /etc/hosts
encuentras la entrada 127.0.1.1 YourLinuxBoxName
.
Esta entrada de localhost en particular (cada dirección 127/8
es localhost
) es utilizada por DNSmasq. Es seguro ignorarlo.
Respuesta2
Deberías cambiar la siguiente línea:
127.0.1.1 rany-01 rany-01
en /etc/hosts
. Debe ser:
127.0.1.1 ubuntu-rany-01
O puedes cambiar el contenido de /etc/hostname
: rany-01
en lugar de ubuntu-rany-01
.