Skip to content

Select Startup Network Adapter

matchRos edited this page Apr 29, 2021 · 2 revisions

If ifmetric is not installed use the following command: sudo apt-get install ifmetric

Then with the command: sudo ifmetric INSERT_ADAPTER_NAME_HERE INSERT_PRIORITY_VALUE_HERE you can change the priority of the network adapter.

The Adapter name can be found using: ifconfig or route -n

To check which priority value has to be set, check the route -n command to see which Metric value must be used. A lower metric (priority) value means a higher priority. So choose a value below the lowest metric value in the table.

When executing this command it will only last for one session, so after a reboot the metric values will be reset.

To make these changes permanent add a startup script through Cron.

Important: The startup script will be executed before the network adapters are loaded. So it is necessary to insert a delay using sleep 10 in the shell script.

Clone this wiki locally