Is there a terminal command to verify if Wifi is enabled?
Edit:
nmcli
changed a lot (I am using 16.04) from its previous version. See the original answer below.
To see the connectivity status
$ nmcli general status
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
connected full enabled enabled enabled enabled
To see only wifi status
$ nmcli radio wifi
enabled
To see the active connection
$ nmcli connection show --active
NAME UUID TYPE DEVICE
VolCSe 5u6h4521-7k1p-20r3-3g4x-fg19his0j3s8 802-11-wireless wlp2s0
There are some nice addlitions like, to get the available wifi network informations,
$ nmcli device wifi
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
* VolCSe Infra 1 54 Mbit/s 73 ▂▄▆_ WPA2
Sach Infra 4 54 Mbit/s 55 ▂▄__ WPA1 WPA2
iKCP Infra 5 54 Mbit/s 24 ▂___ WPA2
TP-LINK_POCKET_3 Infra 1 54 Mbit/s 12 ▂___ WPA1 WPA2
Note: I have used fictitious ssid and uuid info above.
Old answer:
You can use nmcli
for this purpose. Open a terminal type in terminal,
nmcli nm
You will have output like,
RUNNING STATE WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
running connected disabled disabled enabled disabled
See the third and fourth column which contains information of your interest.
If you want to be more specific only to wifi, then try in terminal,
nmcli nm wifi
it will show the wifi status only,
WIFI
disabled
rfkill list
This wil show devices that are either software or hardware blocked. In my case it's not blocked and wifi is on:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
When the driver is up and running, the wireless interface should show up in the list when using the following command:
ifconfig
As of 15.04 (and later, including 16.04 LTS), the nmcli command has changed. There, you'll use:
⟫ nmcli radio
WIFI-HW WIFI WWAN-HW WWAN
enabled enabled enabled enabled
or just
⟫ nmcli radio wifi
enabled