the eth0 default gateway metric is 100, and the 4G default gateway is 700, but we want connect by 4G, how can i change the eth0 metric to 800 and save after reboot?
the network-control interface gives snaps full access to /etc/iproute2/ … you can just create a snap with a service that configures it to your liking with the correct metric.
nmcli connection modify <name> ipv4.route-metric <metric>
Where metric is a number and name is your cellular/4g connection’s name.
In your case, you could set the 4g metric to 50, in order to it has higher priority than eth0.