systemd:
networkctl status eth0|grep -i duid
or
nmcli connection show <<your connection name>> |grep -i uid