Problem Description:
The newly installed CentOS8 system has major changes from the previous version due to the network service commands, so I will introduce it in detail here.
table of Contents
1. Modify the network card configuration file:
2. Restart the network service
1. Modify the network card configuration file:
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens160 #As shown in the figure below, change ONBOOT=no to yes
2. Restart the network service
nmcli c reload ens160
#Restart network card[root@localhost ~]# nmcli c reload ens160# Reload all ifcfg or route to connection (not effective immediately) nmcli c reload ifcfg-xxx# Reload specified ifcfg or route to connection (not effective immediately) nmcli c load /etc/sysconfig/network-scripts/ifcfg-ethX nmcli c load /etc/sysconfig/network-scripts/route-ethX# The connection takes effect immediately, there are 3 methods nmcli c up ethX nmcli d reapply ethX nmcli d connect ethX
3. Test the network
Network back to normal