How to find status of wlan0?

The current (in 2017) methods are:

  1. ip for all network interfaces, including setting up and down:

    ip link set wlan0 up
    ip link set wlan0 down
    ip help
    ip link help
    ip addr help
    
  2. iw for wireless extensions (needs to be called as root):

    iw dev
    iw phy
    iw wlan0 scan
    iw wlan0 station dump
    iw help
    

ifconfig and iwconfig are still supported with the appropriate packages, but some features are only available with ip and iw.


The net-tools program is deprecated and the iproute2 has been used to replace it :

program     obsoleted by
arp         ip neigh
ifconfig    ip addr
ipmaddr     ip maddr
iptunnel    ip tunnel
route       ip route
nameif      ifrename
mii-tool    ethtool

The ip show will display the state of your network interface.

in addition there are some others tools will help you to get the state of your network interface :

cat /sys/class/net/<interface>/carrier

sample output:

1

the 1 mean your interface is up and 0 is down.

Or simply you can use the following command :

cat /sys/class/net/<interface>/operstate

sample output:

UP

or

DOWN