Installing CentOS
later, CentOS
the default is not activate the card, so there is no way the new network after you install, the solution is relatively simple, configured to activate the boot on the line.
Activation steps:
1. Enter the network configuration directory
cd /etc/sysconfig/network-scripts/
# 查看该目录下的文件
ls
2. Edit the configuration file
Use vi
(the system comes) / vim
(to be installed) to edit ifcfg-ensXX
or ifcfg-ethXX
file information word, and then save it.
[Note] ifcfg- XXXXX
: XXXXX
is the network card device name.
ifcfg-l0
It is a local loopback interface, which is equivalent to 127.0.0.1
don't care about it. Generally, it is booted by default.
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=ens33
UUID=b0415e92-70fe-4b13-9344-c8f0f6d73d7d
DEVICE=ens33
ONBOOT=no
The ONBOOT=no
change ONBOOT=yes
can be.
[Note] It ONBOOT
is to configure whether to activate the network card when the system is started. Only the network card in the activated state can connect to the network normally.
3. reboot
After the configuration is complete, you need to restart reboot
.
Personal blog: Roc's Blog