search
HomeOperation and MaintenanceCentOSThe centos7 system cannot find the network card

The centos7 system cannot find the network card

Mar 16, 2020 pm 04:07 PM
centos7network card

The centos7 system cannot find the network card

Question:

After installing the CentOS7 virtual machine, after adding the network card, CentOS 7 has no network card configuration file. After adding the second network card, enter the CentOS 7 system After that, the network card configuration file cannot be seen.

After entering the CentOS7 system, use ip addr to check and find that both enp2s0 and eno1 have IP addresses and can be used normally. eno1 uses a manually configured IP, and ens37 uses an IP address automatically obtained by dhcp, but The ifcfg-enp2s0 configuration file cannot be found in the /etc/sysconfig/network-scripts/ directory.

(Recommended tutorial: centos usage tutorial)

Solution:

1. Use the nmcli con show command to view the UUID information of the network card , write down the UUID value

[root@compute2 ~]# nmcli con show
NAME    UUID                                  TYPE      DEVICE 
eno1    637339a0-5444-46a7-b852-4fb4821955b4  ethernet  eno1   
enp2s0  3d80f469-318c-3864-942e-8d601abb4549  ethernet  --

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

enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether e8:4e:06:71:99:eb brd ff:ff:ff:ff:ff:ff

3. Change /etc/sysconfig/network-scripts/ Copy the ifcfg-eno1 file in the directory and name it ifcfg-enp2s0. Modify the configuration file again, paying attention to modifying the necessary hardware information.

[root@compute2 network-scripts]# cat ifcfg-enp2s0 
BOOTPROTO=dhcp
NAME=enp2s0
UUID=3d80f469-318c-3864-942e-8d601abb4549
DEVICE=enp2s0
ONBOOT=yes
HWADDR=e8:4e:06:71:99:eb

4. Finally, restart the network card.

service network restart

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of The centos7 system cannot find the 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
Comparing CentOS Replacements: Features and BenefitsComparing CentOS Replacements: Features and BenefitsMay 01, 2025 am 12:05 AM

Alternatives to CentOS include AlmaLinux, RockyLinux, and OracleLinux. 1.AlmaLinux provides RHEL compatibility and community-driven development. 2. RockyLinux emphasizes enterprise-level support and long-term maintenance. 3. OracleLinux provides Oracle-specific optimization and support. These alternatives have similar stability and compatibility to CentOS, and are suitable for users with different needs.

CentOS vs. Other Linux Distributions: A ComparisonCentOS vs. Other Linux Distributions: A ComparisonApr 30, 2025 am 12:07 AM

CentOS is suitable for enterprise and server environments due to its stability and long life cycle. 1.CentOS provides up to 10 years of support, suitable for scenarios that require stable operation. 2.Ubuntu is suitable for environments that require quick updates and user-friendly. 3.Debian is suitable for developers who need pure and free software. 4.Fedora is suitable for users who like to try the latest technologies.

CentOS's Departure: Choosing the Right AlternativeCentOS's Departure: Choosing the Right AlternativeApr 29, 2025 am 12:04 AM

Alternatives to CentOS include AlmaLinux, RockyLinux, and OracleLinux. 1.AlmaLinux and RockyLinux rebuild RHEL 1:1, providing high stability and compatibility, suitable for enterprise environments. 2. OracleLinux provides high performance through UEK, suitable for users who are familiar with the Oracle technology stack. 3. When choosing, stability, community support and package management should be considered.

CentOS's Replacement: Exploring the New OptionsCentOS's Replacement: Exploring the New OptionsApr 28, 2025 am 12:17 AM

CentOS alternatives include RockyLinux, AlmaLinux, and OracleLinux. 1. RockyLinux and AlmaLinux provide stable distributions compatible with RHEL, suitable for users who need long-term support. 2. CentOSStream is suitable for users who focus on new features and development cycles. 3. OracleLinux is suitable for users who need enterprise-level support.

Replacing CentOS: Identifying Suitable ReplacementsReplacing CentOS: Identifying Suitable ReplacementsApr 27, 2025 am 12:04 AM

CentOS needs alternatives because CentOSStream no longer provides long-term support. Alternative options include: 1. RockyLinux, which provides 10 years of life cycle support, suitable for users who need stability. 2.AlmaLinux also provides 10 years of support and has strong community support. 3. OracleLinux, provides RHEL-compatible version, and flexible life cycle management.

The End of CentOS: Evaluating the ImpactThe End of CentOS: Evaluating the ImpactApr 26, 2025 am 12:03 AM

The end of CentOS has had a significant impact on users, with users having the option of RHEL, AlmaLinux, Debian or Ubuntu as alternatives. 1. The migration cost is high, requiring time and money. 2. Community division affects open source projects. 3.RHEL provides commercial support, but it is costly. 4.AlmaLinux is similar to CentOS and has low migration costs. 5. Debian and Ubuntu need more time to adapt.

CentOS: An Explanation of the Decision-Making ProcessCentOS: An Explanation of the Decision-Making ProcessApr 25, 2025 am 12:03 AM

CentOS is suitable as an enterprise-class server operating system because it is stable, secure and free. 1) It is based on RHEL and provides high compatibility with RHEL. 2) Use yum for package management to ensure that the software is easy to install and update. 3) The community regularly releases security patches, with a support cycle of up to 10 years.

The Discontinuation of CentOS: Understanding the FactorsThe Discontinuation of CentOS: Understanding the FactorsApr 24, 2025 am 12:01 AM

The reason why CentOS stopped maintaining is RedHat's strategic change. User response strategies include: 1. Migrating to other distributions, such as UbuntuServer, Debian or RockyLinux; 2. Continue to use CentOS7 until June 2024; 3. Turning to CentOSStream; 4. Build solutions, such as custom distributions based on RHEL or using container technology.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function