Home > Article > Operation and Maintenance > How to set the network card to start automatically on boot in centos system
1. Open the network card configuration file
vi /etc/sysconfig/network-scripts/ifcfg-enp2s1
(Recommended tutorial: centos usage tutorial)
2. Edit the network card configuration File
Find the ONBOOT=no in it and change it to ONBOOT=yes, then: wq to save.
The final display is as follows:
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp2s1 UUID=eef13cf9-886b-476f-a977-50a7299fbe21 DEVICE=enp2s1 ONBOOT=yes ZONE=public
3. Restart the network
service network restart #重启网络
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to set the network card to start automatically on boot in centos system. For more information, please follow other related articles on the PHP Chinese website!