Each time I start Ubuntu (20.04) I always need to start a terminal and run:
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
Since its for some reason not possible to configure Function Keys behavior permanently in the system setting (See On an Apple Keyboard under Linux, how do I make the Function keys work without the fn modifier key?)
But can I at least add the above command to some init script that will be executed automatically each time Ubuntu starts even though it requires sudo/root permissions?