Linux ethtool Command: Inspect Network Link and Driver Settings

ethtool queries or sets the link speed, auto-negotiation, driver, and statistics information of an Ethernet interface. It is useful for checking the link status when the physical connection is unstable.

What is the ethtool command?

Speed, Duplex, and Link detected show the results of negotiation between the device and the switch. Supported items vary depending on the NIC, driver, and virtualization environment. Even if the link is detected, it does not mean that IP settings, routing, DNS, or the peer service are functioning properly.

Basic syntax

ethtool [options] interface

The installed implementation and options may vary by distribution. Check the description for the current system with man ethtool.

Examples

Checking link status

Find the actual interface name using ip link show and then query it.

ethtool enp1s0

Driver information

Check the driver name and firmware version.

ethtool -i enp1s0

Interface Statistics

Check error and drop counters provided by the driver.

ethtool -S enp1s0

Distinguishing Link Speed and Connection Status

ethtool retrieves information about a network interface's link speed, duplex mode, and driver-supported features. Check the interface name with ip link.

sudo ethtool eth0

Part of the example output (values may differ or be empty on virtual devices):

Speed: 1000Mb/s
Duplex: Full
Link detected: yes

Link detected: yes means that a physical or virtual link is detected, but it does not indicate that the IP address, default route, DNS, or internet connection is working. You can check the driver with ethtool -i eth0. Options to change link settings may disconnect the connection, so distinguish between commands for viewing and changing.

Main Options and Format

Options/Format Description
-i Display driver and firmware information.
-S Display NIC and driver statistics.
-k Display the status of features such as offload.
-a Display flow control settings.
-s Change link settings such as speed and duplex. Caution is needed.

Precautions when using

If speed or auto-negotiation is changed on the remote server using ethtool -s, the connection may be disconnected. Record the current values with the query command and compare them with the switch port settings before making changes. Some physical link values may not be provided or may have different meanings on virtual interfaces.

Frequently Asked Questions

Link detected: If yes, does it mean the network is normal?

It is closer to meaning that a physical link is detected. IP addresses, routing, DNS, and service responses need to be checked separately.

Official Documentation

The exact behavior of the option and differences depending on implementation can be found in the official documentation related to ethtool.

More in This Category
Linux ethtool Command: Inspect Network Link and Driver Settings

Linux ethtool Command: Inspect Network Link and Driver Settings

Learn how to inspect Network Link and Driver Settings with the Linux ethtool command, including practical examples, key options, and important precautions.

Linux umask Command: Control Default File Permissions

Linux umask Command: Control Default File Permissions

Learn how to control Default File Permissions with the Linux umask command, including practical examples, key options, and important precautions.

Linux more Command: View Text One Screen at a Time

Linux more Command: View Text One Screen at a Time

Learn how to use Linux more to read text one screen at a time, move and search interactively, start at a line or pattern, and choose between more and less.

Linux printenv Command: Print Environment Variable Values

Linux printenv Command: Print Environment Variable Values

Learn how to use the Linux printenv command to print all environment variables or selected variable values, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux mv Command: Move and Rename Files and Directories

Linux mv Command: Move and Rename Files and Directories

Learn how to move and rename files or directories with Linux mv, avoid unwanted overwrites, clarify destination paths, and handle cross-filesystem moves.

Linux fmt Command: Reformat Plain-Text Paragraphs

Linux fmt Command: Reformat Plain-Text Paragraphs

Learn how to reformat Plain-Text Paragraphs with the Linux fmt command, including practical examples, key options, and important precautions.

Linux sftp Command: Transfer Files Securely over SSH

Linux sftp Command: Transfer Files Securely over SSH

Learn how to use the Linux sftp command to transfer and manage files securely through an SSH connection, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux host Command: Look Up DNS Names and Addresses

Linux host Command: Look Up DNS Names and Addresses

Learn how to look Up DNS Names and Addresses with the Linux host command, including practical examples, key options, and important precautions.

Linux ss Command: Inspect Open Ports and Sockets

Linux ss Command: Inspect Open Ports and Sockets

Learn how to inspect Open Ports and Sockets with the Linux ss command, including practical examples, key options, and important precautions.

Linux nohup Command: Keep a Command Running After Logout

Linux nohup Command: Keep a Command Running After Logout

Learn how to use the Linux nohup command to keep a command running after the terminal closes or the user logs out, with essential options, practical examples, output interpretation, and common troubleshooting tips.