Home >Operation and Maintenance >CentOS >How to start the network card in centos7
#How to start the network card in centos7?
Centos 7 cannot ping Baidu
Use the ip addr command to check the IP settings and find that ens33 does not have the inet attribute, so it cannot be passed. IP address to connect to the virtual machine.
Use the vi command to view the ens33 network card configuration: vi /etc/sysconfig/network-scripts/ifcfg-ens33
It is found from the configuration that centos7 does not start by default Network card (ONBOOT=no)
Change this item to yes(ONBOOT=yes)
vi editor, delete to delete characters, insert to insert characters, After completion, press Esc to exit, and enter: wq to save and exit
Restart the network card: service network start
View ip Setting
can ping Baidu
##Press ctrl c to exitvi 编辑器保存命令 按ESC键 跳到命令模式,然后: :w 保存文件但不退出vi :w file 将修改另外保存到file中,不退出vi :w! 强制保存,不推出vi :wq 保存文件并退出vi :wq! 强制保存文件,并退出vi q: 不保存文件,退出vi :q! 不保存文件,强制退出vi :e! 放弃所有修改,从上次保存文件开始再编辑Related references:
The above is the detailed content of How to start the network card in centos7. For more information, please follow other related articles on the PHP Chinese website!