How do I list DNS server order in systemd-resolve?
It is stupid, but you can't!
systemd-resolved
follows internal rules to choose the "correct" DNS. This might be different for each query. It uses things like if a server worked or failed in the past, interface order and even what domains allocated to each interface. It's difficult to manage with some VPN setups.
The best you can do is check the /run/systemd/resolve/resolv.conf
file. That is the resolv.conf
file generated by systemd-resolved
.