我的主机名是 smit-Aspire-5742,但现在每当我输入sudo fing
它给出以下输出
smit@smit-Aspire-5742:~$ sudo fing
[sudo] password for smit:
16:00:07 > Discovery profile: Default discovery profile
16:00:07 > Discovery class: data-link (data-link layer)
16:00:07 > Discovery on: 192.168.1.0/24
16:00:07 > Discovery round starting.
16:00:07 > Host is up: 192.168.1.2
HW Address: 4C:0F:6E:3D:13:87 (Hon Hai Precision)
Hostname: Sanskruti-PC.Home
16:00:07 > Host is up: 192.168.1.1
HW Address: AC:F1:DF:E6:DB:5D
Hostname: D-Link.Home
16:00:07 > Host is up: 192.168.1.3
HW Address: C8:3A:35:CF:97:E9 (Tenda Technology)
Hostname: Shivai-Desktop.Home
16:00:08 > Discovery progress 25%
16:00:09 > Discovery progress 50%
^C16:00:09 > Discovery stopped
这是我的笔记本电脑,显示我的主机名是 Sanskruti-PC.Home。
HW Address: 4C:0F:6E:3D:13:87 (Hon Hai Precision)
Hostname: Sanskruti-PC.Home
它向我显示了正确的主机名,直到我的妹妹登录到与 Ubuntu 双重启动的 Windows。我尝试了这些链接上的所有方法 :-
我还将 Windows 中的计算机名称从 Sanskruti-PC.Home 更改为 smit-Aspire-5742,但什么也没有发生。
这是我的hostname
命令的输出
smit-Aspire-5742
这是主机名的问题吗?指?
命令的输出nslookup Sanskruti-PC.Home
smit@smit-Aspire-5742:~$ nslookup Sanskruti-PC.Home
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: Sanskruti-PC.Home
Address: 192.168.1.2
并输出命令 nslookup smit-Aspire-5742
smit@smit-Aspire-5742:~$ nslookup smit-Aspire-5742
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: smit-Aspire-5742
Address: 127.0.1.1
答案1
192.168.1.2 smit-Aspire-5742
我在 /etc/hosts 中添加了一行