Home > Operation and Maintenance > CentOS > What should I do if centos cannot obtain IP?

What should I do if centos cannot obtain IP?

藏色散人
Release: 2020-05-18 11:42:56
Original
3408 people have browsed it

What should I do if centos cannot obtain IP?

What should I do if centos cannot obtain an IP? Solution to the problem of not being able to obtain the IP after installing centos

Many times, after installing in the virtual machine, go into centos and use ifconfig to find that there is no such command. You can use ip a to check the IP,

If there is no ip, centos is generally installed without enabling the network card by default. Solution:

CentOS configures the network card to automatically obtain the IP address upon startup

Open /etc/sysconfig/network-scripts /ifcfg-eth0 Change ONBOOT="no" to ONBOOT="yes"

After saving: systemctl restart network

can solve this problem.

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if centos cannot obtain IP?. 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