Home>Article>Operation and Maintenance> How to solve centos cannot obtain ip

How to solve centos cannot obtain ip

WJ
WJ Original
2020-06-03 15:33:32 2239browse

How to solve centos cannot obtain ip

How to solve the problem that centos cannot obtain IP?

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, usually centos The default installation does not enable the network card. Solution:

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

Open/etc/sysconfig/network-scripts/ifcfg-eth0WillONBOOT=”no”Change toONBOOT=”yes”

After saving:

systemctl restart network

This problem can be solved

Related Reference:centOS Tutorial

The above is the detailed content of How to solve centos cannot obtain ip. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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