Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Ubuntu 雙系統有線網路無法上網?排查與修復全攻略

編輯:Linux 系統常見問題解答

問題現象

Windows 下有線網路正常,Ubuntu 下網卡已連線卻無法上網。排除硬體與 ISP 故障後,專注於 Ubuntu 網路設定。

快速嘗試步驟

  1. 重啟 NetworkManager
    sudo systemctl restart NetworkManager(舊版用 sudo service network-manager restart)
  2. 檢查網卡驅動
    ifconfig eth0(或 ip link)
    若無錯誤訊息,驅動正常。嘗試重置介面:
    sudo ifconfig eth0 down && sudo ifconfig eth0 up
  3. 手動設定 IP 與 DNS
    參考 Windows 下的設定(ipconfig /all),注意 IP 不衝突、DNS 正確。Ubuntu 預設 DNS 常為 192.168.1.1,但路由器可能已修改,需確認。

永久修復:編輯 Netplan(Ubuntu 17.10+)或 /etc/network/interfaces(舊版)

Netplan 範例(/etc/netplan/01-netcfg.yaml)

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
      addresses: [192.168.1.100/24]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1, 114.114.114.114]

套用:sudo netplan apply

傳統 interfaces 範例

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 114.114.114.114

重啟網路:sudo systemctl restart networking 或重開機。

常見陷阱

  • /etc/resolv.conf 在新版 Ubuntu 由 systemd-resolved 管理,手動修改重開機會失效,請改用上述正規管道。
  • 雙系統快速啟動會鎖定網卡,Windows 關機時請用「完全關機」(Shift+關機)。

Windows IP 設定參考

Copyright © Windows教程網 All Rights Reserved