View Full Version : How to install Linux headers without an internet connection?

2022-01-21, 22:06
Hello everyone. I hope I am posting in the right section.

I have a laptop running Kali 2021.3 (amd64 version), and I need to install the drivers for my network adapter, otherwise I won't be able to access the internet.
I have found a Github repo which contains a community maintained version of the drivers. I have to use dkms to install them.
So I downloaded dkms using dget on the .dsc you can find under "versioned links" on this page: https://pkg.kali.org/pkg/dkms .
I did this on my other PC, put it on a pen drive and installed it on the Kali system.

Now dkms apparently needs the linux headers to install the driver.
I have found http://old.kali.org/kali/pool/main/l/linux/linux_5.10.46-4kali1.dsc which seems to be the correct version, used dget to pull it and it gives me two files "linux_5.10.46.orig.tar.xz" and "linux_5.10.46-4kali1.debian.tar.xz".
However, I'm not sure this archive contains what I am looking for, and if it does, I don't know how to use these archives to install the headers.

Can I install the headers using these files?
If yes, how can I do it?
If not, may you suggest some other way of achieving what I am trying to do?

Thank you for your attention, I hope some of you can help me.