Skip to content

Instantly share code, notes, and snippets.

@techtonik
Created December 16, 2013 19:05
Show Gist options
  • Save techtonik/7992503 to your computer and use it in GitHub Desktop.
Save techtonik/7992503 to your computer and use it in GitHub Desktop.
Get ids of available network interfaces
import os
def get_nic_ids():
return os.listdir('/sys/class/net')
# Linux: Yes
# MacOS: Unknown
# FreeBSD: Unknown
# Windows: No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment