how to change priority in network interface ubuntu

Shell
sudo ifmetric wlan0 50
# ifmetric <network interface> <desired metric>
# the interface with the lowest metric is used for internet connection.
Source

Also in Shell: