MyWiseGuys

How can I tell what interface is active in Linux?


  • Dennis
    Keymaster

    Running Linux in a VM and not sure which of the installed interfaces are active.  Does anyone know how to check?


    Dennis
    Keymaster

    First run

    ls /sys/class/net
    ens160 ens192 lo

    Now you see what interfaces you have.  Let’s find out which one has a link light.

    cat /sys/class/net/ens160/carrier
    1
    
    cat /sys/class/net/ens192/carrier
    0

    So ens160 has a link light and ens192 doesn’t

You must be logged in to reply to this topic.