Force priority for network connection (ifmetric)

Make eth0 wlan0 a higher priority with two or more NICs

If you have two network connections, for example eth0 and wlan0 and you want wlan0 to be prioritised over eth0, you can manually do it using ifmetric:
ifmetric wlan0 50

The lower the last number the higher the priority.

You can check the metric value by typing:

To make the change permanent, first run:
nmcli connection

Find the connection name you want to be a priority, which may be the ESSID.

Then run:
nmcli connection modify [connection name] ipv4.route-metric 50

To make the change take place right away run:
nmcli connection up [connection name]

The change will persist between reboots