我的虛擬機老是網卡不能啟動,特此寫下此文,方便下次解決問題。
0.【ifup eth0】和【service networking restart】無效
1.【ipcofnig 】 命令沒有發現網卡
2.【ip addr 】發現網卡
3.【ip link set dev eth0 up】 啟動該網卡,成功
4.【ifconfig eth0 192.168.0.111 netmask 255.255.255.0】為此網卡配置IP
5.【route add default gw 192.168.0.1】為此網卡配置路由
6.【echo 'nameserver 114.114.114.114' 】整改DNS
7.【 ping qq.com】通了表示成功