查看目录,如果有ifcfg-eth0,ifcfg-ens33之类的,表示有网卡
但不确定是否开启,如果使用的vmware,且有桌面的化,可以用鼠标点一点就可以开启网络
[root@bogon network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@bogon network-scripts]# ls
ifcfg-eth0 ifdown-ippp ifdown-routes ifup-bnep ifup-plip ifup-sit network-functions
ifcfg-lo ifdown-ipv6 ifdown-sit ifup-eth ifup-plusb ifup-tunnel network-functions-ipv6
ifdown ifdown-isdn ifdown-tunnel ifup-ippp ifup-post ifup-wireless
ifdown-bnep ifdown-post ifup ifup-ipv6 ifup-ppp init.ipv6-global
ifdown-eth ifdown-ppp ifup-aliases ifup-isdn ifup-routes net.hotplug
命令行开启网络
修改后不用每次都需要vmware图形化界面开启
vim /etc/sysconfig/network-scripts/ifcfg-eth0
将ONBOOT=no修改为ONBOOT=yes
修改后尽量运行下面命令,保证修改成功
service network restart
或
systemctl restart network
检验成功
ping www.baidu.com
查看网络地址
ifconfig
或
ip addr
标签:network,linux,ifcfg,开启,网卡,ipv6,ifup,scripts,ifdown
From: https://www.cnblogs.com/breeze666/p/17840652.html