iwgetid
Get wireless network ESSID (name)
SYNOPSIS
iwgetid [interface] [options]
PARAMETERS
interface
The name of the wireless network interface (e.g., wlan0, eth1) to query. If omitted, iwgetid attempts to find the first available wireless interface.
-r, --raw
Output only the ESSID or NWID, suppressing the field name and interface name. Useful for scripting when only the identifier is needed.
-s, --s-raw
Similar to --raw, but also suppresses any error messages. This is particularly useful for shell scripts where silent operation is required.
-a, --all
Output all available information for the specified interface, including ESSID, BSSID, and NWID.
-P, --protocol
Output the wireless protocol name (e.g., IEEE 802.11).
-F, --freq
Output the current operating frequency of the wireless network.
-C, --channel
Output the current operating channel of the wireless network.
-H, --hwaddr
Output the BSSID (Basic Service Set Identifier), which is the MAC address of the connected Access Point.
-L, --ap
Output the BSSID (MAC address of the Access Point). Functionally identical to --hwaddr.
-N, --nwid
Output the NWID (Network ID), an older 16-bit identifier for the network.
-E, --essid
Output the ESSID (Extended Service Set Identifier), the human-readable name of the wireless network.
-p, --privacy
Output the privacy status (whether encryption is enabled or disabled) for the network.
-G, --getmode
Output the operating mode of the wireless interface (e.g., Ad-Hoc, Managed, Master, Monitor).
-v, --version
Display the version information for the Wireless-tools package.
-V
Display verbose version information, including compilation options.
-D, --debug
Enable debug output for troubleshooting.
DESCRIPTION
iwgetid is a utility from the Wireless-tools package designed to display the identifier of a wireless network connected to a specific interface.
It can report the ESSID (Extended Service Set Identifier), which is the human-readable network name, the older NWID (Network ID), or the BSSID (Basic Service Set Identifier), which is the MAC address of the access point.
This command is part of an older suite of tools that rely on the Linux Wireless Extensions (WE) API, making it suitable for systems using older wireless drivers or kernels where the modern nl80211 framework (used by tools like iw) might not be fully adopted or preferred.
CAVEATS
iwgetid is part of the older Wireless-tools suite, which relies on the Wireless Extensions (WE) API.
It has largely been superseded by newer tools like iw, which utilize the more modern nl80211 kernel interface.
Consequently, iwgetid may not work correctly or provide complete information with very new wireless drivers or kernel versions that primarily support nl80211.
Its functionality is limited to querying certain network identifiers and parameters, not for configuration.
NETWORK IDENTIFIERS
iwgetid is capable of reporting several types of wireless network identifiers:
- ESSID (Extended Service Set Identifier): The human-readable name of the Wi-Fi network.
- NWID (Network ID): An older, numerical 16-bit identifier, less commonly used today.
- BSSID (Basic Service Set Identifier): The MAC address of the Access Point (AP) or base station that the wireless client is currently associated with.
WIRELESS EXTENSIONS (WE) API
This command operates based on the Linux Wireless Extensions (WE) API. This is a set of standard kernel interfaces that allow userspace tools to configure and retrieve information from wireless LAN devices.
While historically significant, most modern Linux wireless drivers and utilities (like iw) have transitioned to using the more advanced and flexible nl80211 kernel interface for wireless communication.
HISTORY
iwgetid originated as part of the Wireless-tools for Linux project, developed by Jean Tourrilhes.
This project was crucial in providing wireless network configuration and information utilities for Linux systems in the early days of wireless networking.
It relies on the kernel's Wireless Extensions API, which was the standard method for interacting with wireless hardware for many years.
While still available on many distributions, its usage has declined significantly with the advent of the nl80211 subsystem and the `iw` command, which offer more advanced and robust functionality.