Ubuntu 22.04桌面有线网络连接故障求助:Live CD可正常连接
Hey there, sorry to hear your wired connection's acting up on Ubuntu 22.04—good call checking the Live CD first, that tells us your hardware’s totally fine, so we just need to troubleshoot system-side configurations. Let’s walk through some practical steps to get your connection back:
Check NetworkManager status
Ubuntu relies on NetworkManager for most network management by default. First, verify it’s running:systemctl status NetworkManagerIf it shows "inactive", start it up and set it to launch on boot:
sudo systemctl start NetworkManager sudo systemctl enable NetworkManagerReset NetworkManager configuration
Corrupted config files are a common culprit. Back up your current config first, then reset to defaults:sudo cp /etc/NetworkManager/NetworkManager.conf /etc/NetworkManager/NetworkManager.conf.bak sudo nano /etc/NetworkManager/NetworkManager.confReplace the file content with this default setup:
[main] plugins=ifupdown,keyfile dns=dnsmasq [ifupdown] managed=trueSave and exit (press
Ctrl+O, hit Enter, thenCtrl+X), then restart NetworkManager:sudo systemctl restart NetworkManagerReinstall/update your network adapter driver
Since the Live CD works, the driver might be corrupted on your installed system. First, identify your Ethernet adapter model:lspci | grep EthernetFor example, if you have a Realtek adapter, install the dedicated DKMS driver:
sudo apt update && sudo apt install r8168-dkmsReboot your system after installation to apply changes.
Manually configure a static IP
Sometimes DHCP issues cause connection failures. First, find your network interface name:ip link showThen use
nmclito set a static IP (replaceenp0s3, IP addresses, and connection name with your actual details):sudo nmcli con mod "Wired connection 1" ipv4.method manual ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8,8.8.4.4 sudo nmcli con up "Wired connection 1"You can check your existing wired connection names with
nmcli con show.Reinstall NetworkManager entirely
If all else fails, a fresh install of NetworkManager might fix hidden issues:sudo apt purge network-manager sudo apt install network-manager sudo reboot
Let me know if any of these steps resolve your issue, or if you run into specific errors—we can troubleshoot further!
备注:内容来源于stack exchange,提问作者mr dude

