Get active interface - BSD

This is a discussion on Get active interface - BSD ; Hi, assuming that a host has only one active (LAN-)interface is there a command to query its name? Thanks, Helmut -- No Swen today, my love has gone away My mailbox stands for lorn, a symbol of the dawn...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Get active interface

  1. Get active interface

    Hi,

    assuming that a host has only one active (LAN-)interface is there a command
    to query its name?

    Thanks, Helmut

    --
    No Swen today, my love has gone away
    My mailbox stands for lorn, a symbol of the dawn


  2. Re: Get active interface

    On Mon, 27 Oct 2008 22:07:13 UTC, "Helmut Schneider"
    wrote:

    > assuming that a host has only one active (LAN-)interface is there a command
    > to query its name?


    ifconfig -a, but you might need to parse that if you want to extract the
    name. You'll get the loopback interface too.

    --
    Bob Eager
    UNIX since v6..
    http://tinyurl.com/2xqr6h


  3. Re: Get active interface

    Bob Eager wrote:
    > On Mon, 27 Oct 2008 22:07:13 UTC, "Helmut Schneider"
    > wrote:
    >
    >> assuming that a host has only one active (LAN-)interface is there a
    >> command to query its name?

    >
    > ifconfig -a, but you might need to parse that if you want to extract the
    > name. You'll get the loopback interface too.


    Well...yes...but...

    I thought about a single command showing a single line. No grep, awk,
    whatever...

    --
    No Swen today, my love has gone away
    My mailbox stands for lorn, a symbol of the dawn


  4. Re: Get active interface

    Bob Eager wrote:
    > On Mon, 27 Oct 2008 22:07:13 UTC, "Helmut Schneider"
    > wrote:
    >
    >> assuming that a host has only one active (LAN-)interface is there a
    >> command to query its name?

    >
    > ifconfig -a, but you might need to parse that if you want to extract the
    > name. You'll get the loopback interface too.


    Well...yes...but...

    I thought of a single command showing a single line. No grep, awk,
    whatever...

    --
    No Swen today, my love has gone away
    My mailbox stands for lorn, a symbol of the dawn

+ Reply to Thread