How to Install wifi drivers on Debian 11 Bullseye

Endrit Qerreti

Endrit Qerreti

In this tutorial you will learn how to install broadcom wifi drivers on Debian 11. If you recently have installed Debian 11 and were not able to install wifi drivers during the installation, you can skip setting up them and do it after installing the system.

It is important to have internet access when installing Debian because it will install a Desktop GUI and all the packages for an usable system.

The difference is that when you install debian without internet access, debian will install only the base system, which means you won't have a desktop GUI and you will have to setup everything by yourself as base system basically means only a terminal that you can use to install a desktop environment and other stuff. However, this is totally up to you, internet access will save some of your time, but in the other hand there's nothing wrong why to not do this manually by using the base system.

Step 1 - Open sources.list

To be able to install wifi drivers, first you need to make the necessary changes by adding the source from where wifi drivers will be downloaded on the sources file.

Sources.list is the file that we need to open via a text editor

sudo nano /etc/apt/sources.list

and paste the following source below

deb http://deb.debian.org/debian bullseye contrib non-free

Next, save it by pressing CTRL+X and confirm with Y.

Step 2 - Update your system

Once you have added the non free source on sources.list file, you need to update your system

sudo apt-get update

Wait for the update to finish and move to the next step. If you encounter issues during the update, make sure your account has the right permission to perform an update on your system.

Step 3 - Install kernel headers

broadcom-sta-dkms is the kernel module support for the wireless lan driver. Before installing broadcom-sta-dkms you need to install kernel headers to make sure broadcom-sta-dkms will work as intented.

apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') 

Step 4 - Install broadcom-sta-dkms

Next, to install broadcom-sta-dkms, run

sudo apt install broadcom-sta-dkms

Step 5 - Remove conflicting modules

Use the modprobe command to remove any modules that might be conflicting with other modules.

modprobe -r b44 b43 b43legacy ssb brcmsmac bcma

Step 6 - Enable wl driver

Now all you have to do is to enable the wl driver, to do this simply run the command below

modprobe wl

After loading the wl driver, the wifi card on your computer will be recognized and you should see the wifi icon on the taskbar, if wifi doesn't start automatically and you can't see any available wifi make sure to turn on wifi by pressing the wifi button on your laptop or by right clicking over the wifi icon and clicking "Enable Wifi" option.

Conclusion

In this tutorial, we explained step by step how to install wifi drivers on Debian 11 and what difference makes the internet connection during the installation of Debian 11.