Ubuntu Desktop 多網卡下使用 Network Manager 變更 route metric

nmcli 變更 metric

sudo nmcli connection modify $connection-name ipv4.route-metric 100
sudo nmcli connection down $connection-name
sudo nmcli connection up $connection-name

參考文章

How to set metric in OS moderated with NetworkManager

nmcli — command-line tool for controlling NetworkManager

2.3. 使用 NETWORKMANAGER 命令行工具 NMCLI