Foreword:
centos7 no longer supports the ifconfig command, and has replaced it with the ip addr command.
Solution:
Edit the ifcfg_ens33 file to activate the network card
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens33
(Recommended tutorial: centos tutorial)
Change ONBOOT=no to ONBOOT=yes, save and exit, and then execute the command
service network restart
to restart the network service.
Related video tutorial recommendations: linux video tutorial
The above is the detailed content of Network ping fails under centos7. For more information, please follow other related articles on the PHP Chinese website!