# ethtool — Inspect and Configure Network Interfaces on Linux

> Practical guide to ethtool — query and configure link speed, duplex, offload features and ring buffers on Linux, with diagnostic examples.

Source: https://www.jpkc.com/db/en/cheatsheets/networking/ethtool/

<!-- PROSE:intro -->
ethtool gives you direct access to the driver and hardware layer of Linux network interfaces: query link speed, duplex mode, auto-negotiation, driver version, ring buffer sizes, and offload features – all without a reboot. Whether you're diagnosing packet drops, enabling Wake-on-LAN, or tuning queue depth for maximum throughput, ethtool puts you in direct control of your NIC.
<!-- PROSE:intro:end -->

## Basic Information

`ethtool DEVICE` — Show interface settings: speed, duplex, link status, auto-negotiation.

```bash
ethtool eth0
```

`ethtool -i DEVICE` — Show driver and firmware information.

```bash
ethtool -i eth0
```

`ethtool -d DEVICE` — Dump hardware register values.

```bash
sudo ethtool -d eth0
```

`ethtool -P DEVICE` — Show the permanent (factory) MAC address.

```bash
ethtool -P eth0
```

## Link & Speed

`ethtool DEVICE | grep 'Link detected'` — Check if a cable is plugged in and link is active.

```bash
ethtool eth0 | grep 'Link detected'
```

`ethtool DEVICE | grep 'Speed'` — Check the current link speed.

```bash
ethtool eth0 | grep 'Speed'
```

`ethtool -s DEVICE speed SPEED duplex full autoneg off` — Set link speed and duplex manually. Disable auto-negotiation.

```bash
sudo ethtool -s eth0 speed 1000 duplex full autoneg off
```

`ethtool -s DEVICE autoneg on` — Enable auto-negotiation.

```bash
sudo ethtool -s eth0 autoneg on
```

`ethtool -s DEVICE speed SPEED duplex full autoneg on` — Advertise a specific speed with auto-negotiation.

```bash
sudo ethtool -s eth0 speed 1000 duplex full autoneg on
```

`ethtool -s DEVICE wol g` — Enable Wake-on-LAN (magic packet).

```bash
sudo ethtool -s eth0 wol g
```

`ethtool -s DEVICE wol d` — Disable Wake-on-LAN.

```bash
sudo ethtool -s eth0 wol d
```

## Statistics

`ethtool -S DEVICE` — Show detailed NIC statistics (rx/tx packets, errors, drops, etc.).

```bash
ethtool -S eth0
```

`ethtool -S DEVICE | grep -i error` — Show only error counters.

```bash
ethtool -S eth0 | grep -i error
```

`ethtool -S DEVICE | grep -i drop` — Show only drop counters.

```bash
ethtool -S eth0 | grep -i drop
```

`ethtool --phy-statistics DEVICE` — Show physical-layer (PHY) statistics.

```bash
ethtool --phy-statistics eth0
```

## Offload Features

`ethtool -k DEVICE` — Show all offload and feature settings.

```bash
ethtool -k eth0
```

`ethtool -K DEVICE FEATURE on|off` — Enable or disable a specific offload feature.

```bash
sudo ethtool -K eth0 tso off
```

`ethtool -K DEVICE tx-checksum-ipv4 off` — Disable TX IPv4 checksum offload.

```bash
sudo ethtool -K eth0 tx-checksum-ipv4 off
```

`ethtool -K DEVICE gro off gso off tso off` — Disable multiple offload features at once.

```bash
sudo ethtool -K eth0 gro off gso off tso off
```

`ethtool -K DEVICE rx-checksumming on tx-checksumming on` — Enable hardware checksum offload.

```bash
sudo ethtool -K eth0 rx-checksumming on tx-checksumming on
```

## Ring Buffers & Coalescing

`ethtool -g DEVICE` — Show ring buffer sizes (current and maximum).

```bash
ethtool -g eth0
```

`ethtool -G DEVICE rx SIZE tx SIZE` — Set ring buffer sizes. Larger buffers reduce drops under load.

```bash
sudo ethtool -G eth0 rx 4096 tx 4096
```

`ethtool -c DEVICE` — Show interrupt coalescing settings.

```bash
ethtool -c eth0
```

`ethtool -C DEVICE rx-usecs USECS` — Set RX interrupt coalescing delay in microseconds.

```bash
sudo ethtool -C eth0 rx-usecs 100
```

`ethtool -C DEVICE adaptive-rx on` — Enable adaptive RX coalescing.

```bash
sudo ethtool -C eth0 adaptive-rx on
```

## Queues & Channels

`ethtool -l DEVICE` — Show the number of RX/TX queues (channels).

```bash
ethtool -l eth0
```

`ethtool -L DEVICE combined N` — Set the number of combined RX/TX queues.

```bash
sudo ethtool -L eth0 combined 4
```

`ethtool -x DEVICE` — Show the RX flow hash indirection table (RSS).

```bash
ethtool -x eth0
```

`ethtool -n DEVICE` — Show flow classification rules (ntuple filters).

```bash
ethtool -n eth0
```

## Diagnostics

`ethtool -t DEVICE` — Run the NIC self-test (if supported by driver).

```bash
sudo ethtool -t eth0
```

`ethtool -t DEVICE online` — Run online self-test (does not disrupt traffic).

```bash
sudo ethtool -t eth0 online
```

`ethtool -p DEVICE SECONDS` — Blink the NIC LED for physical identification.

```bash
sudo ethtool -p eth0 10
```

`ethtool --show-eee DEVICE` — Show Energy Efficient Ethernet (EEE) settings.

```bash
ethtool --show-eee eth0
```

`ethtool -m DEVICE` — Show transceiver module (SFP/SFP+) information.

```bash
ethtool -m eth0
```

<!-- PROSE:outro -->
## Conclusion

ethtool is the essential diagnostic tool for Linux network cards: a few commands reveal link problems, let you tune buffers and queues for peak throughput, and activate hardware features like TSO or checksum offloading. For persistent settings across reboots, configure them via udev rules or NetworkManager.

## Further Reading

- [ethtool(8) – manual page](https://man7.org/linux/man-pages/man8/ethtool.8.html) – every option at a glance
- [ethtool – Wikipedia](https://en.wikipedia.org/wiki/Ethtool) – background and history
- [ethtool – kernel documentation](https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html) – Netlink API reference
<!-- PROSE:outro:end -->

## Related Commands

- [ip](https://www.jpkc.com/db/en/cheatsheets/networking/ip/) – manage network interfaces and routes
- [ss](https://www.jpkc.com/db/en/cheatsheets/networking/ss/) – display socket statistics
- [netstat](https://www.jpkc.com/db/en/cheatsheets/networking/netstat/) – network connections and statistics

