6

From what I had read sometime back, it seems iwconfig is deprecated and the current methods is -

$ sudo ifconfig wlan0 up

and

$ sudo ifconfig wlan0 down

But couldn't find anything which tells the status of the wifi and know which mode it is on, which AP it is attached to, how much data is being transferred and so on and so forth on the CLI.

8

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.

6

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.