VMware Workstation/Player 安裝 CentOS 後無法上網,多數因網路模式未設為 NAT 或宿主機 VMware 網路服務未啟動。三步驟快速修復。

Win+R → services.msc → 找到並啟動 (設為自動):


# CentOS 6 / 傳統 init
service network restart
# 或
/etc/init.d/network restart
# CentOS 7+ / systemd
systemctl restart network
# 徹底重啟 (最保險)
reboot
# 或
shutdown -r now
ifconfig -a # 確認 eth0/ens33 獲得 192.168.x.x IP
ping www.google.com # 或 ping 8.8.8.8 測試 DNS
curl -I https://www.baidu.com # 測試 HTTP
/etc/sysconfig/network-scripts/ifcfg-eth0 確認 ONBOOT=yes、BOOTPROTO=dhcp/etc/resolv.conf 確認有 nameserver 8.8.8.8vmnetcfg.exe) 確認 VMnet8 (NAT) 子網設定正確、DHCP 服務啟用NAT 模式 + 兩大服務啟動 + 客體重啟,解決 99% VMware CentOS 聯網問題。