How to check network card information in Linux

Release: 2019-12-30 16:47:05
Original
28572 people have browsed it

How to check network card information in Linux

1. Use the ifconfig command to view network card information

ifconfig is a command used to display or configure network devices (network interface cards) in Linux. Its full English name is It's network interfaces configuring. ifconfig can set the status of network devices or display the current settings.

Example:

How to check network card information in Linux

2. Use ethtool to view the network card

Ethtool is used to query and set network card parameters under Linux Order.

Usage summary:

ethtool ethx //Query the basic settings of the ethx network port, where x is the number of the corresponding network card, such as eth0, eth1, etc.

ethtool --H // Display the command of EthTool (Help)

# EthTool --i Ethx // Query the relevant information of ETHX network port

ETHTOOL —D ETHX // Query ETHX network port registered information information

ethtool –r ethX //Reset the ethX network port to adaptive mode

ethtool –S ethX //Query the statistics of packets sent and received by the ethX network port

ethtool –s ethX [speed 10|100|1000] [duplex half|full] [autoneg on|off] //Set the network port speed to 10/100/1000M, set the network port half/full duplex, and set whether the network port is auto-negotiation

Example:

[root@CentOS76 ~]# ethtool ens192
Settings for ens192:
    Supported ports: [ TP ]
    Supported link modes:   1000baseT/Full 
                            10000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: No
    Supported FEC modes: Not reported
    Advertised link modes:  Not reported
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Advertised FEC modes: Not reported
    Speed: 10000Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: off
    MDI-X: Unknown
    Supports Wake-on: uag
    Wake-on: d
    Link detected: yes
[root@CentOS76 ~]#
Copy after login

Free video tutorial sharing:linux video tutorial

The above is the detailed content of How to check network card information in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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