15

I just installed a clean image of the latest Raspbian Stretch Lite.

Specifically - 2017-09-07-raspbian-stretch-lite.img

ifconfig shows that my wifi interface wlan0 is detected and up.

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:c6:dc:d4  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

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2516  bytes 144456 (141.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2516  bytes 144456 (141.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.165  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::d4dd:c202:d337:c0de  prefixlen 64  scopeid 0x20<link>
        ether 00:24:a5:36:ed:49  txqueuelen 1000  (Ethernet)
        RX packets 49461  bytes 49499638 (47.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 36499  bytes 4455517 (4.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

However, trying to use the ifdown or ifup commands says that the device does not exist.

[pi:~] sudo ifdown wlan0
ifdown: unknown interface wlan0

Perhaps, ifup and ifdown will only work if /etc/network/interfaces is used to manage the networking devices, and that is apparently not the case in the raspbian stretch lite version dated 2017-09-07

4
  • Thank you for the informative comment! FYI I downloaded the raspbian lite image on raspberrypi.org/downloads/raspbian The one that says - Raspbian Stretch Lite Minimal image based on Debian Stretch Version: September 2017 Release date: 2017-09-07 Kernel version: 4.9
    – saraf
    Commented Nov 24, 2017 at 13:56
  • The /etc/network/interfaces file still exists. Is it possible to use that file to manage network interfaces (and disable dhcpcd)?
    – saraf
    Commented Nov 24, 2017 at 14:07
  • 1
    For those confused by the "deprecated" status of ifconfig, here's a decent thread on that ServerFault: Should I quit using Ifconfig? .. ifconfig will exist for a long long time. Kind of like IPv4. There is more than one way to configure a system. I use ifconfig because it's very easy and gives a nice output that I'm used to... that's my preference, and I will continue to use it as long as it is included in the repo. Commented Nov 24, 2017 at 14:38
  • 1
    After 2+ years, this seems to remain a valid question without a clear answer. This Q&A was helpful, but not definitive.
    – Seamus
    Commented Feb 3, 2020 at 18:57

2 Answers 2

24

What does work instead of

sudo ifup wlan0
sudo ifdown wlan0

is

sudo ifconfig wlan0 up
sudo ifconfig wlan0 down
2
  • 5
    When the "powers that be" decide to change all of this (networking business) around, how do they let their users know what they've done? Or, do they simply make changes, and leave the peasants to fend for themselves? What I find most confusing, are all of the "artifacts" they leave scattered about in /etc.
    – Seamus
    Commented Apr 10, 2018 at 17:38
  • In this RPi forum entry an alternative using "ip" was mentioned: sudo ip link set wlan0 up and sudo ip link set wlan0 down. Seems to work fine on this Raspbian Buster running on a RPi 1B with a wi-fi stick.
    – cato_minor
    Commented Jan 2, 2021 at 10:04
1

I had a similar problem after installing PiHole. I found this site to be helpful. https://raspberry-projects.com/pi/programming-in-c/tcpip/configuring-network-adaptors

In my case, I had tried to change the PiHole static IP after instalation and I had two IPs in the /etc/dhcpcd.conf file. Once I corrected the error my Pi is working on the wired connection again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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