Questions tagged «ip-address»

5
检查主机名的IP时出现错误“主机名:名称或服务未知”
我在公司的云服务上运行Ubuntu 14.04(我的实例具有弹性IP)。我想检查我正在通过命令行运行的实例的IP地址,但是没有用。 root@ubuntu14-graphite:~# hostname ubuntu14-graphite root@ubuntu14-graphite:~# hostname -i hostname: Name or service not known 我不明白原因。 我尝试ping到ubuntu14-graphite,但它说: unknown host ubuntu14-graphite. 这是否意味着我的房东甚至不存在? 我有另一台服务器(不是云实例,而是物理服务器)。在此服务器上,我安装了CentOS 6.7。我检查了主机名的IP,即使没什么特别的,它也能正常工作/etc/hosts。 这是的输出cat /etc/hosts: 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

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.