Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7546873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:18:41+00:00 2026-05-30T09:18:41+00:00

How do you programmatically determine under Linux if your current active ethernet interface is

  • 0

How do you programmatically determine under Linux if your current active ethernet interface is a wireless device?

For example, my machine has a wired and wireless interface, and the output of my ifconfig is:

eth0      Link encap:Ethernet  HWaddr 64:b9:e9:cd:4f:b3  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:7700676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3412854 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3131639132 (3.1 GB)  TX bytes:16826666276 (16.8 GB)
          Interrupt:27 Base address:0x4000 

eth2      Link encap:Ethernet  HWaddr 01:16:4b:1b:90:c9  
          inet addr:192.168.1.152  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fa81::216:baff:de1b:91cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2307478 errors:15 dropped:0 overruns:0 frame:18469924
          TX packets:1924909 errors:527 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2475924284 (2.4 GB)  TX bytes:996430577 (996.4 MB)
          Interrupt:23 

Is there anything there that identifies one as wireless?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:18:42+00:00Added an answer on May 30, 2026 at 9:18 am

    While it may be common for all network traffic to go over a single interface—especially in a single adapter system—it is not true in the general case. For example, my laptop commonly alternates routing over wi-fi and its 100baseT cable.

    Inspect the output of ip route for a wlan entry. That, at least, indicates whether there could be wireless traffic. The default route is probably the best indication.

    Hardwired system:

    [wally@lenovotower ~]$ ip route
    default via 192.168.0.1 dev eth0  proto static 
    192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.103  metric 1 
    192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1
    

    Wi-fi system:

    [wally@lenovafedora ~]$ ip route
    192.168.0.0/24 dev wlan0  proto kernel  scope link  src 192.168.0.105  metric 2 
    192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 
    default via 192.168.0.1 dev wlan0  proto static 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to programmatically determine if the current user (or process) has access to
How would I programmatically determine when an android device has rebooted (whether on its
How do I programmatically determine which OS Emacs is running under in ELisp? I
I'm writing backup software. I want to programmatically determine if a file has been
I need to be able to programmatically determine the doctype of the current page
I'm trying to programmatically determine the current height and width of my application. I
I need to programmatically determine out how many sectors, heads, and cylinders are on
How can I programmatically determine if I have access to a server (TCP) with
Goal: to programmatically determine the sizes (in bytes) of the fields of a class.
How can I programmatically determine sites of a SharePoint 2007 installation that use custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.