Home >Operation and Maintenance >CentOS >How to solve the problem that CentOS cannot find the configuration file after adding a new network card

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

WJ
WJOriginal
2020-06-03 15:33:512342browse

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

How to solve the problem that CentOS cannot find the configuration file after adding a new network card? After using the VMware Workstation virtual machine to install the CentOS7 virtual machine, there is a problem that CentOS 7 does not have a network card configuration file after adding a network card. After adding a second network card, after entering the CentOS 7 system, the network card configuration file cannot be seen.

After entering the CentOS7 system, use ip addr to check the status as follows:

It is found that ens33 and ens77 both have IP addresses and can be used normally. ens33 uses manual IP configuration and ens37 uses The IP address automatically obtained by dhcp, but the ifcfg-ens37 configuration file cannot be found in the /etc/sysconfig/network-scripts/ directory

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

Solution:

1. Use the

nmcli con show

command to view the UUID information of the network card and write down the UUID value

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

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

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

3. Change /etc/sysconfig/network-scripts/ Copy the ifcfg-ens33 file in the directory and name it ifcfg-ens37. Re-modify the configuration file and pay attention to modifying the necessary hardware information.

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

#4. Finally, restart the network card.

How to solve the problem that CentOS cannot find the configuration file after adding a new network card

Related references: centOS Tutorial

The above is the detailed content of How to solve the problem that CentOS cannot find the configuration file after adding a new network card. 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