command

ip route show default

In this case I am getting internet through the enp2s0 interface

I have the Linux distribution: Ubuntu Server

That is, this will work for Linux distributions that have that command.