How can the network card speed be configured in Linux?
To set the network card speed on Linux, you can use the following command:
- Check the current network card speed:
sudo ethtool eth0
The network interface to be viewed here is called “eth0”.
- Temporarily modify the network card speed:
sudo ethtool -s eth0 speed 100
The network card name being changed here is “eth0,” and the speed value being set is “100.”
- Permanently changing network card speed:
You can achieve permanently changing the network card speed by modifying the network configuration file.
Open the network configuration file.
sudo nano /etc/network/interfaces
Locate the network card configuration to be changed in the file, and add the following line:
up ethtool -s eth0 speed 100
The “eth0” here refers to the network interface card to be changed, and “100” is the speed value to be set.
Save and close the file, then restart the network service.
sudo systemctl restart networking
This will permanently change the network card speed.