Permanently disabling one of two network interfaces in Raspberry Pi OS 10
by Turbocapitalist from LinuxQuestions.org on (#5S5TM)
I have a machine with two wifi interfaces. I would like to find a way to permanently turn off just the built-in interface so the off state persists across reboots. Similarly I would like to leave the second interface running as normal with DHCP and such. I've looked at about five documents under the systemd section of FreeDesktop.org but to no avail.
What do I change so that wlan0 is always down and never comes up automatically, yet still allow wlan1 to function as normal?
I can use temporary measures,
Code:sudo ifconfig wlan0 downBut that requires manual intervention not just with the interface but also with each of the services which have already started.
I've tried using a cron job, but that seems to have no effect or else is overridden by systemd somehow.
Code:$ sudo crontab -l | sed -e '/^#/d; /^$/d'
@reboot /usr/sbin/ifconfig wlan0 downThis is for Raspberry Pi OS, formerly Raspbian, version 10 aka Buster.
Code:$ lsb_release -rd
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
What do I change so that wlan0 is always down and never comes up automatically, yet still allow wlan1 to function as normal?
I can use temporary measures,
Code:sudo ifconfig wlan0 downBut that requires manual intervention not just with the interface but also with each of the services which have already started.
I've tried using a cron job, but that seems to have no effect or else is overridden by systemd somehow.
Code:$ sudo crontab -l | sed -e '/^#/d; /^$/d'
@reboot /usr/sbin/ifconfig wlan0 downThis is for Raspberry Pi OS, formerly Raspbian, version 10 aka Buster.
Code:$ lsb_release -rd
Description: Raspbian GNU/Linux 10 (buster)
Release: 10