i want to write a device driver but not able to find the header file can someone please help me find them?Also if someone can point out some important site links that would be really appreciated
You should be able to install the kernel header files for the currently running kernel by running the following in a terminal:
sudo apt-get install linux-headers-$(uname -r)
In general, the kernel header packages are named linux-header-* where "*" indicates the version & variant (generic, server, etc.).
Case of Obsolete kernel package
This should cover another problem when: the currently running kernel is obsolete, meaning it's not in the repository anymore neither its headers. So the best thing to do is to update the kernel to last version in the repository.
linux-generic is a meta package to keep current version of the kernel & its headers:
sudo apt-get update sudo apt-get install linux-generic
Note: Depending on your Ubuntu edition, See if you need
linux-lowlatency (Ubuntu Studio),
these commands should work:
sudo apt-get dist-upgrade -y systemctl reboot sudo apt-get install linux-headers-$(uname -r) sudo apt-get upgrade linux-headers-$(uname -r)
for better instruction checkout this video