ethtool

networkingLinux
The ethtool command is one of the most frequently used commands in Linux/Unix-like operating systems. ethtool Display or modify Ethernet device settings

Quick Reference

Command Name:

ethtool

Category:

networking

Platform:

Linux

Basic Usage:

ethtool [options] [arguments]

Common Use Cases

  • 1

    Network troubleshooting

    Diagnose network connectivity and performance issues

  • 2

    Hardware identification

    Identify network interfaces using the blinking LED feature

  • 3

    Performance optimization

    Configure NIC settings for optimal network performance

  • 4

    Hardware testing

    Run self-tests on network interfaces to verify functionality

Syntax

ethtool [options] devname

Options

Option Description
-a, --show-pause Show pause parameter information
-c, --show-coalesce Show coalesce parameters
-C, --coalesce Set coalesce parameters
-g, --show-ring Show ring parameters
-G, --set-ring Set ring parameters
-i, --driver Show driver information
-k, --show-features Show offload features
-K, --features Set offload features
-p, --identify Blink LED to identify NIC
-S, --statistics Show NIC statistics
-s, --change Change device parameters
-t, --test Run self-tests

Examples

How to Use These Examples

The examples below show common ways to use the ethtool command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

# Basic Examples Basic
ethtool eth0
Display driver and hardware settings for eth0.
ethtool -i eth0
Show driver information for eth0.
# Advanced Examples Advanced
ethtool -s eth0 speed 1000 duplex full Set eth0 to 1 Gbps full duplex mode. ethtool -S eth0 Display detailed NIC statistics for eth0. ethtool -p eth0 5 Identify eth0 by blinking the LED for 5 seconds. ethtool -g eth0 Show the rx/tx ring parameter information for eth0.

Try It Yourself

Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

Understanding Syntax

Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

Notes

The ethtool command allows system administrators to view and modify network interface card (NIC) parameters. It works with Ethernet devices to control settings such as speed, duplex mode, Wake-on-LAN functionality, and various hardware offload features. This tool is particularly useful for diagnosing network issues, optimizing network performance, and checking the capabilities of network hardware. Common use cases include: 1. Checking link status and speed negotiation 2. Identifying network hardware by blinking the activity LED 3. Adjusting NIC performance parameters 4. Enabling or disabling hardware offload features 5. Running NIC self-tests to diagnose hardware issues 6. Collecting driver and hardware statistics Note that changes made with ethtool are not persistent across reboots unless added to network configuration files or startup scripts.

Tips & Tricks

1

Use ethtool -i to display driver information for a network interface

2

Use ethtool -p to identify a network card by blinking its LED

3

Use ethtool -S to show detailed statistics for troubleshooting

4

Use ethtool -s to set speed, duplex mode, and other parameters

5

Add ethtool commands to network scripts for persistent configuration changes

Common Use Cases

Network troubleshooting

Diagnose network connectivity and performance issues

Hardware identification

Identify network interfaces using the blinking LED feature

Performance optimization

Configure NIC settings for optimal network performance

Hardware testing

Run self-tests on network interfaces to verify functionality

Driver inspection

View detailed information about network device drivers

Related Commands

These commands are frequently used alongside ethtool or serve similar purposes:

Use Cases

1

Network troubleshooting

Diagnose network connectivity and performance issues

2

Hardware identification

Identify network interfaces using the blinking LED feature

3

Performance optimization

Configure NIC settings for optimal network performance

4

Hardware testing

Run self-tests on network interfaces to verify functionality

5

Driver inspection

View detailed information about network device drivers

Learn By Doing

The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the ethtool command works in different scenarios.

$ ethtool
View All Commands