how to change priority in network interface ubuntu 1

how to change priority in network interface ubuntu

sudo ifmetric wlan0 50
# ifmetric  
# the interface with the lowest metric is used for internet connection.

Here is what the above code is Doing:
1. It’s checking if the network is connected.
2. If it is, it’s checking if the network is connected to the internet.
3. If it is, it’s checking if the network is connected to the internet via the ethernet cable.
4. If it is, it’s setting the metric of the ethernet interface to 1.
5. If it isn’t, it’s setting the metric of the ethernet interface to 50.
6. If the network isn’t connected to the internet, it’s setting the metric of the ethernet interface to 50.
7. If the network isn’t connected, it’s setting the metric of the ethernet interface to 50.

Similar Posts