I can't find the way to properly turn on the wi-fi card on my laptop When I turn it on and issue
$ sudo iwconfig wlan0 txpower auto $ sudo iwlist wlan0 scan wlan0 Interface doesn't support scanning : Network is down
it reports that the network is down. The attempt to bring it up also fails
$ sudo ifup wlan0 wlan0 no private ioctls. Failed to bring up wlan0.
Apparently I'm missing some basic low-level
When I issue
dhclient on the interface.
$ sudo dhclient -v wlan0 Internet Systems Consortium DHCP Client 4.2.2 Copyright 2004-2011 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ ^C$
and interrupt it, it brings the device up somehow and then scanning etc. works. I'd like to avoid this obviously superfluous step
sudo ip link set wlan0 up or
sudo ifconfig wlan0 up .
Answer from Apr 13'17:
This is an attempt to elaborate on martin's answer
ifdown commands are part of ifupdown package , which now is considered a legacy frontend for network configuration , compared to newer ones, such as
network manager .
ifupdown reads configuration settings from
/etc/network/interfaces ; it runs
post-down scripts from
/etc/network , which include starting
/etc/wpasupplicant/ifupdown.sh that processes additional
wpa-* configuration options for wpa wifi, in
zcat /usr/share/doc/wpasupplicant/README.Debian.gz for documentation). For WEP
wireless-tools package plays similar role to
iwconfig is from
wireless-tools , too.
ifconfig at the same time is a lower level tool , which is used by
ifupdown and allows for more flexibility. For instance, there are 6 modes of wifi adapter functioning and IIRC
ifupdown covers only managed mode (+ roaming mode, which formally isn't mode?). With
ifconfig you can enable e.g. monitor mode of your wireless card, while with
ifupdown you won't be able to do that directly.