I'm having a strange problem on a RPi 2 Model B. I just reformatted the sd card with the newest version of Raspbian and done all the sudo get update/upgrade stuff. I've plugged in an ethernet connection and a wifi-dongle. They both are operational. I have internet access from the ethernet cable.

In terminal, running

sudo ifdown wlan0


ifdown: interface wlan0 not configured

even if I have run

ifconfig wlan0

which outputs

wlan0: flags=4099<UP,BROADCAST,MULTICASST> mtu 1500
        ether 00:0f:60:07:fa:ef txqueuelen 1000 (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0  carrier 0  collisions 0

Why doesn't ifdown work (can I fix it)? It doesn't work for my eth0 connection either. Also my /etc/network/interfaces file seems a bit weird to me, the only line in it that's not commented is:

source-directory /etc/network/interfaces.d

There is nothing in /etc/network/interfaces.d. The reason why I want to run ifdown is that I want to use the raspberry pi as a router and one of the steps in the guide I'm following says to use that. Either way, I'll need it to be functional in the future (and ifup outputs the same error message).

Notes: In the taskbar, hovering over the internet icon shows a tooltip: Connection to dhcpd lost. I don't know what it means, but Wicd Network Manager shows that I have access to both a wired network and I can see all of the wifi networks from the Wicd GUI. lsusb shows the wireless network adapter. iw list shows the normal stuff. dmesg | more shows the USB Receiver and normal stuff.

  • This question is far too vague. What does "done all the sudo get update/upgrade stuff" mean? I assume you are running an update of an older install (which is NOT officially supported), particularly if you are running non-standard software like Wicd. If you choose to depart from the standard Raspbian you have to expect to solve the compatibility issues. dhcpcd is the normal Raspbian network manager.
    – Milliways
    Oct 9 '17 at 7:27
  • sudo apt-get update; sudo apt-get upgrade. It is a completely new install (RASPBIAN STRETCH WITH DESKTOP Sept 2017). I simply installed Wicd to see what was wrong.
    – Paul Ngo
    Oct 9 '17 at 8:07
  • If it is "completely new install" forget all the Debian ifdown etc. See How do I set up networking/WiFi/Static IP Post the COMPLETE config files if you need help, but installing additional incompatible network managers is not going to help.
    – Milliways
    Oct 9 '17 at 8:24
  • If it is "completely new install" there will be NO wlan0 for an external dongle.
    – Milliways
    Oct 9 '17 at 8:29

ifdown/ifup and ifconfig are different ways to control your network interfaces.

ifconfig controls your interfaces directly, ie: ifconfig wlan0 down

ifdown wlan0 will try to use configuration in /etc/network/interfaces

Since you state that there is no config there, the ifup and ifdown commands will fail.

EDIT: As Milliways stated. ifconfig is depracated.

The method that should be used now is the ip command. ip link set wlan0 down is now the way to directly control your interface.

  • 1
    ifconfig is deprecated
    – Milliways
    Oct 9 '17 at 8:26
  • 1
    Yes, it is. But it was included in the question. I'll elaborate in my answer.
    – 88weighed
    Oct 9 '17 at 8:29
  • Running ip link set wlan0 up resulted in RTNETLINK answers: Operation not possible due to RF-kill for me, so I checked with rfkill list all to see what was being killed, and then ran sudo rfkill unblock all and the ip command again to bring the interface up, and now it's appearing correctly. Apr 4 '18 at 20:46
  • I do that but after running ip command ,I run sudo ifconfig but wlan0 does not get ip.
    – H.Ghassami
    Aug 20 '18 at 9:12

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