Home > Operation and Maintenance > CentOS > The network card configuration file cannot be found under centos

The network card configuration file cannot be found under centos

王林
Release: 2020-03-27 18:19:59
Original
3325 people have browsed it

The network card configuration file cannot be found under centos

Problem:

After installing CentOS6.5 using the VMware Workstation virtual machine, the IP of the computer always changes. The methods found online are all about changing the configuration file of the computer's network card, but the network card has an IP. After searching, it was found that there is no configuration file for the corresponding network card, so the following method is suitable for situations where the configuration file for the corresponding network card cannot be found.

Solution:

1. Use the nmcli con command to check the UUID information of the network card and write down the UUID value

nmcli con
Copy after login

The network card configuration file cannot be found under centos

(recommended Tutorial: centos tutorial)

2. Use the ip addr command to view the network card information and remember the MAC address of eth5

ip addr
Copy after login

The network card configuration file cannot be found under centos

3 , copy the ifcfg-eth0 file in the /etc/sysconfig/network-scripts/ directory and name it ifcfg-eth5.

 cd /etc/sysconfig/network-scripts/
 cp ifcfg-eth0 ifcfg-eth5
Copy after login

The network card configuration file cannot be found under centos

4. Re-modify the configuration file , pay attention to modify the necessary hardware information.

vi ifcfg-eth5
Copy after login

The network card configuration file cannot be found under centos

5. Restart the network card.

service network restart
Copy after login

6. Check the IP again, it’s already fine and it won’t change in the future

ifconfig
Copy after login

The network card configuration file cannot be found under centos

The above is the detailed content of The network card configuration file cannot be found under centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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