我尝试过的:
我的计算机中有一个备用硬盘,我安装了 Linux Mint(20.2 cinnamon 64 位)。现在我可以启动到 Windows(我的主操作系统)或 Mint。全新安装后,我可以轻松连接到互联网,我可以完美地下载并安装系统更新。配置完设置后,我在 Windows 上玩了一段时间游戏。当我重新启动 Mint 时,我无法访问互联网。我尝试过通过Google的传统方式解决这个问题,但没有成功。我什至尝试从全新安装时创建的快照进行恢复。但我尝试过的任何方法都无法让我上网。
当前配置和有用的(希望)输出:
$> arp -a
_gateway (192.168.0.1) at <incomplete> on eno1
$> cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
$> cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
address 192.168.0.22
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
#post-up iptables-restore < /etc/iptables.up.rules
gateway 192.168.0.1
dns-nameservers 192.168.0.22 8.8.8.8
$> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether e0:3f:49:eb:23:b3 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.22/24 brd 192.168.0.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 2601:845:c100:940:4053:8cea:72a7:901c/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 345591sec preferred_lft 345591sec
inet6 fe80::c826:b952:2608:8ee2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
$> cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[device]
wifi.scan-rand-mac-address=no
$> cat /etc/NetworkManager/NetworkManagerconf.d/10-globally-managed-devices
[keyfile]
unmanaged-devices=none
$> nmcli d
DEVICE TYPE STATE CONNECTION
eno1 ethernet connected Ifupdown (eno1)
lo loopback unmanaged --
$> cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
$> ping -c 10 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.0.22 icmp_seq=1 Destination Host Unreachable
From 192.168.0.22 icmp_seq=2 Destination Host Unreachable
From 192.168.0.22 icmp_seq=3 Destination Host Unreachable
From 192.168.0.22 icmp_seq=4 Destination Host Unreachable
From 192.168.0.22 icmp_seq=5 Destination Host Unreachable
From 192.168.0.22 icmp_seq=6 Destination Host Unreachable
From 192.168.0.22 icmp_seq=7 Destination Host Unreachable
From 192.168.0.22 icmp_seq=8 Destination Host Unreachable
From 192.168.0.22 icmp_seq=9 Destination Host Unreachable
From 192.168.0.22 icmp_seq=10 Destination Host Unreachable
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 0 received, +10 errors, 100% packet loss, time 9207ms
pipe 3
$> ping -c 10 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.22 icmp_seq=1 Destination Host Unreachable
From 192.168.0.22 icmp_seq=2 Destination Host Unreachable
From 192.168.0.22 icmp_seq=3 Destination Host Unreachable
From 192.168.0.22 icmp_seq=4 Destination Host Unreachable
From 192.168.0.22 icmp_seq=5 Destination Host Unreachable
From 192.168.0.22 icmp_seq=8 Destination Host Unreachable
From 192.168.0.22 icmp_seq=9 Destination Host Unreachable
From 192.168.0.22 icmp_seq=10 Destination Host Unreachable
--- 192.168.0.1 ping statistics ---
10 packets transmitted, 0 received, +8 errors, 100% packet loss, time 9211ms
pipe 4
$> route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eno1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eno1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
答案1
答案竟然是……
启动进入 BIOS
将 Linux Mint 的 HDD 设置为最高启动优先级
关闭计算机电源
直接启动进入Linux
快乐的配置
(我猜想 Windows 驱动程序不会完全放弃对硬件的控制,直到重新启动电源为止,因此重新启动 Linux 不起作用。)
感谢@Murray Jensen 的评论(: