I'm on a raspberry pi 4b

/home/pi# uname -r

and trying to set

/sbin/ethtool -s eth0 speed 100 duplex full

The simple reason for that is because it does not work with autoneg / full speed.

Years ago I would have set that in /etc/network/interfaces but from what I googled the last hours that is depreciated. Additionally my pi would not if I do that. To my mind crontab is not a great solution; additionally I want to set eth0 as the primary connection - needed at boot. Where can put that setting ideally?


  • Add that as a line at the bottom of /etc/rc.local (just before exit 0).
    – Dougie
    Jan 1, 2021 at 1:00

3 Answers 3


Ok, I found a solution. I did set up a service. First the script:

cat /etc/network/eth0speed.sh

/sbin/ethtool --change eth0 advertise 0x008

Set the execution rights to ugo+x. Then the service:

etc/systemd/system# cat ethernet-settings.service


Description = Set ethernet speed to max 100mbps






Enable the service:

systemctl enable ethernet-settings.service
  • 2
    No need to have an extra bash script. ExecStart=/usr/bin/bash/ -c '/sbin/ethtool --change eth0 advertise 0x008' will also do.
    – Ingo
    Jan 1, 2021 at 14:58
  • 1
    @Ingo The forward slash after /usr/bin/bash shouldn't be there.
    – alwaysask
    Jan 12, 2021 at 16:55
  • @alwaysask You are right, that's a typo.
    – Ingo
    Jan 12, 2021 at 19:51

You would be better to fix the problem.

If you decide to continue try:-

sudo ethtool -s eth0 autoneg off
sudo ethtool -s eth0 speed 1000

AFAIK the setting then persists. (I once did this, and had some difficulty restoring autoneg.)

See https://raspberrypi.stackexchange.com/a/116687/8697


You can also add it to the crontab of root. I admit it is a hack:

@reboot sleep 15 && /sbin/ethtool -s eth0 speed 100 duplex full autoneg on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.