I have a small (desktop) PC with a USB WiFi dongle.

Ubuntu likes to manage the power consumption of the WiFi dongle, and puts it in to energy saving mode (very slow net connection)

There is plenty of documentation within the Ubuntu world as to where I should put the commands to stop power management of the device in the case of laptops which seem to choose to do this when moved to battery power from mains power.

Whereabouts should I rest the commands

#!/bin/sh
/sbin/iwconfig/ wlan0 power off

so that the device is always removed from any misguided power management?


Thanks in advance,
John