【发布时间】:2020-10-20 07:22:46
【问题描述】:
我必须运行一些具有不同名称的服务器。所以我在C:\Windows\System32\drivers\etc\hosts 中更改了Windows 10 中的主机名。我把名字从localhost改成了brandcil.local:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 brandcil.local
# ::1 brandcil.local
现在当我在 powershell 终端中运行 nslookup 127.0.0.1 时,它显示如下:
Server: UnKnown
Address: 192.168.43.1
Name: localhost
Address: 127.0.0.1
我重新启动了我的机器,但它没有生效。那么如何更改主机名呢?
【问题讨论】:
标签: windows powershell localhost hostname