Before you can use your Ethernet or WiFi network devices (built-in or USB) on Debian 12 to connect to your desired network, you need to install the required driver/firmware for your networking hardware on Debian 12.
In this article, we will show you how to find the driver/firmware that you need to install on your Debian 12 system for the Ethernet/WiFi networking hardware to work. We will also show you how to install the correct driver/firmware for your Ethernet/WiFi networking hardware on your Debian 12 system.
Topic of Contents:
-
- Installing Lshw on Debian 12
- Listing the Installed Network Devices on Debian 12
- Finding the Network Driver/Firmware Package to Install on Debian 12 from the Command-Line
- Finding the Network Driver/Firmware Package to Install on Debian 12 from the Web Browser
- Installing the Correct Network Driver/Firmware Package on Debian 12
- Checking If the Network Driver/Firmware Is Working on Debian 12
- Conclusion
Installing Lshw on Debian 12
To list all the installed hardware of your Debian 12 system, you can use the “lshw” command-line program. Lshw is not installed by default on Debian 12. But you can easily install it from the official Debian 12 package repository.
First, update the APT package database cache with the following command:
To install the “lshw” program, run the following command:
The “lshw” program should be installed on your Debian 12 system.
Listing the Installed Network Devices on Debian 12
To list all the network devices that are installed on your Debian 12 system, run the “lshw” program as follows:
All the network devices that are installed on your computer should be listed.
We plugged in a USB WiFi network adapter on our Debian 12 machine. As you can see, it requires the “mt7601u” driver/firmware to work on Debian 12.
Finding the Network Driver/Firmware Package to Install on Debian 12 from the Command-Line
You can use the apt-file program on Debian 12 to find the network driver/firmware package that you need to install for the Ethernet/WiFi networking device to work on Debian 12.
The apt-file program is not installed on Debian 12 by default. But you can easily install it from the official package repository of Debian 12.
First, update the APT package database cache with the following command:
To install the apt-file program on Debian 12, run the following command:
To confirm the installation, press Y and then press <Enter>.
The apt-file program should be installed on Debian 12.
Before you can use the apt-file program to search for the firmware to install, you must update the apt-file database with the following command:
To search for the package that will install the “mt7601u” driver/firmware for our USB WiFi network device (let’s say), run the apt-file command as follows:
As you can see, the firmware-misc-nonfree package provides the “mt7601u” driver/firmware for our USB WiFi network device on Debian 12. So, that’s the package that we need to install on our Debian 12 system for the USB WiFi network device to work.
The output of the previous apt-file search command showed a lot of output. Usually, the firmware packages of Debian 12 contain the text firmware in the package name. So, you can filter the output of the apt-file search command to print only the packages that contain the firmware text in it.
As you can see, the filtered output shows only the Debian 12 firmware-misc-nonfree package file which contains the “mt7601u.bin” driver/firmware file for our USB WiFi network device.
Finding the Network Driver/Firmware Package to Install on Debian 12 from the Web Browser
You can also find the network driver/firmware package that you need to install on Debian 12 for the Ethernet/WiFi networking device to work from a web browser.
Just visit https://packages.debian.org from your favorite web browser.
Once the page loads, scroll down to the “Search the contents of packages” section, type in the driver/firmware name (i.e. mt7601u) in the “keyword” section[1], select the packages that contain the files whose names contain the keyword from the “Display” section[2], and click on “Search”[3].
You will find the driver/firmware package name that you need to install on your Debian 12 system for your Ethernet/WiFi network device to work.
In our case, we need to install the firmware-misc-nonfree package on our Debian 12 system for the USB WiFi network device to work.
Installing the Correct Network Driver/Firmware Package on Debian 12
Once you found the driver/firmware package name (firmware-misc-nonfree in my case) that you need to install on your Debian 12 system for your network device to work, you can install it as follows:
The required driver/firmware packages are being downloaded. It takes a few seconds to complete.
The required driver/firmware packages are being installed on Debian 12. It takes a few seconds to complete.
At this point, the required driver/firmware packages should be installed on your Debian 12 system.
For the changes to take effect, reboot your Debian 12 machine with the following command:
Checking If the Network Driver/Firmware Is Working on Debian 12
Once your computer boots, you can run the following command to check the Debian 12 system log messages to see if the driver/firmware (mt7601u in my case) is working correctly and your network device is registered.
As you can see, the driver/firmware mt7601u is registered and the “mt7601u” driver initialized our USB WiFi network device.
Our USB WiFi network interface “wlxa09f10efd9be” is available and ready to be used as you can see in the following screenshot. If you need any assistance in configuring the WiFi network interface on your Debian 12 headless server, read this article.
Conclusion
In this article, we showed you how to find the driver/firmware that you need to install on your Debian 12 system for your Ethernet/WiFi networking hardware to work using the “lshw” program. We also showed you how to find the driver/firmware packages to install on your Debian 12 system for the network device to work from the command-line using the apt-file program and from a web browser and how to install the correct driver/firmware on your Debian 12 system for your Ethernet/WiFi networking device to work as well. Finally, we showed you how to verify if the driver/firmware is working and how it initializes your Ethernet/WiFi network device.