Linux CentOS 6.5 ifconfig ip can not find a simple solution

Recently, small partners represent the ifconfig and ip addr command after installing CentOS virtual machines are unable to locate ip address where the author provides a simple and effective way;

1. Switch log in as root

su root

2. Go find relevant configuration file folder, find the file ifcfg-eth0

cd /etc/sysconfig/network-scripts

3. Modify the file, ONBOOT = no change ONBOOT = yes

we ifcfg-eth0

4. Save and exit

:wq

5. Query ip

ifconfig

problem solved;

 

Guess you like

Origin www.cnblogs.com/zhainan-blog/p/11111134.html