To use ethtool, follow these general steps:
-
Open a Terminal: Access your command-line interface (CLI) on your Linux system.
-
Check if ethtool is installed: You can check if
ethtoolis installed by running:ethtool --versionIf it's not installed, you can typically install it using your package manager. For example, on Debian-based systems:
sudo apt-get install ethtool -
Identify your network interface: Use the
ipcommand to list your network interfaces:ip link show -
Use ethtool commands: Here are some common commands you can use with
ethtool:-
View interface settings:
ethtool eth0Replace
eth0with your actual interface name. -
Change speed and duplex settings:
sudo ethtool -s eth0 speed 100 duplex full autoneg off -
Enable auto-negotiation:
sudo ethtool -s eth0 autoneg on -
Display statistics:
ethtool -S eth0 -
Check driver information:
ethtool -i eth0
-
-
Review output: After running a command, review the output for information about your network interface or to confirm that changes were made successfully.
-
Use with caution: Some commands, especially those that change settings, may require root privileges (use
sudo).
By following these steps, you can effectively use ethtool to manage and diagnose your network interfaces.
