Forrest logo
back to the ethtool tool

ethtool:tldr:369bb

ethtool: Set the link speed, duplex mode, and parameter auto-negotiation for a given interface.
$ ethtool -s ${eth0} speed ${select} duplex ${select1} autoneg ${select2}
try on your machine

The command "ethtool" is a Linux command-line utility used to view and change Ethernet device settings.

The specific command you mentioned, "ethtool -s ${eth0} speed ${select} duplex ${select1} autoneg ${select2}", is used to change the speed, duplex mode, and autonegotiation settings of the network interface identified as eth0.

Let's break down the command:

  • "ethtool": This is the command itself, which invokes the ethtool utility.

  • "-s": This option stands for "set settings". It is used to change the settings of the network interface.

  • "${eth0}": The variable "${eth0}" is used to represent the name of the network interface you want to modify. In this case, it is set as "eth0". Note that "eth0" is a conventionally used name for the first Ethernet interface on a Linux system. If you have a different interface name, you need to replace "eth0" with the appropriate name.

  • "speed ${select}": This option sets the speed of the network interface. The variable "${select}" is used to represent the desired speed value. You need to replace "${select}" with the actual desired speed value, such as 10, 100, or 1000 for 10Mbps, 100Mbps, or 1Gbps respectively.

  • "duplex ${select1}": This option sets the duplex mode of the network interface. The variable "${select1}" represents the chosen duplex mode. Replace "${select1}" with either "half" or "full" to select half-duplex or full-duplex mode respectively.

  • "autoneg ${select2}": This option sets the autonegotiation setting for the network interface. The variable "${select2}" represents the desired autonegotiation mode. Replace "${select2}" with either "on" or "off" to enable or disable autonegotiation respectively.

In summary, this command allows you to set the speed, duplex mode, and autonegotiation settings of a specific network interface, in this case, named eth0.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ethtool tool