How to solve centos cannot obtain ip

WJ
Release: 2020-06-03 15:33:32
Original
2301 people have browsed it

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-eth0 WillONBOOT=”no” Change to ONBOOT=”yes”

After saving:

 systemctl restart network
Copy after login

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!

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