Following the question at: https://askubuntu.com/questions/1406445/ubuntu-22-04-server-intel-x550-advertised-speed-not-correct I need to run a command at startup so that the necessary changes are permanent. From the Intel drivers documentation (https://downloadmirror.intel.com/727507/readme.txt), the command is:
pre-up ethtool -s <ethX> advertise 0x1800000001028 || true
I tried to write the command in various files, without success.
Where should I write it ?
Edit 1: Following Anton Danilov's answer, I did not find how to set up a solution with sytemd.link, but I found a different way by creating a service in
/etc/systemd/system
as explained here: https://bbs.archlinux.org/viewtopic.php?id=262075
It works, but is it the optimal way for Ubuntu 22.04 (the link above is a solution for archlinux and is from 2018) ? If no, could someone please provide a complete working solution for Ubuntu Server 22.04 ?