How to set the network card to start automatically on boot in centos system

王林
Release: 2020-03-21 17:16:53
Original
7087 people have browsed it

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
Copy after login

(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
Copy after login

3. Restart the network

service network restart #重启网络
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template