Home > Article > Operation and Maintenance > 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!