Linux Commands Examples

A great documentation place for Linux commands


Report ESSID, NWID or AP/Cell Address of wireless network

see also : iwconfig - ifconfig - iwspy - iwpriv


iwgetid [interface] [--raw] [--scheme] [--ap] [--freq]
[--mode] [--protocol] [--channel]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


echo "S $(cat /sys/class/backlight/acpi_video0/brightness) $(iwgetid --raw) $(acpi -b | grep -o '[0-9]\+%') $(date '+%A %Y-%m-%d %H:%M')"
sleep 10


iwgetid is used to find out the NWID, ESSID or AP/Cell Address of the wireless network that is currently used. The information reported is the same as the one shown by iwconfig, but iwgetid is easier to integrate in various scripts.
By default, iwgetid will print the ESSID of the device, and if the device doesn’t have any ESSID it will print its NWID.
The default formatting output is pretty-print.



This option disables pretty-printing of the information. This option is orthogonal to the other options (except --scheme), so with the appropriate combination of options you can print the raw ESSID, AP Address or Mode.

This format is ideal when storing the result of iwgetid as a variable in Shell or Perl scripts or to pass the result as an argument on the command line of iwconfig.


This option is similar to the previous one, it disables pretty-printing of the information and removes all characters that are not alphanumerics (like space, punctuation and control characters).
The resulting output is a valid Pcmcia scheme identifier (that may be used as an argument of the command cardctl scheme). This format is also ideal when using the result of iwgetid as a selector in Shell or Perl scripts, or as a file name.


Display the MAC address of the Wireless Access Point or the Cell.


Display the current frequency or channel used by the interface.


Display the current channel used by the interface. The channel is determined using the current frequency and the frequency list provided by the interface.


Display the current mode of the interface.


Display the protocol name of the interface. This allows to identify all the cards that are compatible with each other and accept the same type of configuration.
This can also be used to check Wireless Extension support on the interface, as this is the only attribute that all drivers supporting Wireless Extension are mandated to support.

see also

iwconfig , ifconfig , iwspy , iwpriv .

How can this site be more helpful to YOU ?

give  feedback