This tag is for questions about the internals of the Linux kernel itself - particularly about writing code that runs within the context of the kernel (like kernel modules or drivers). Questions about writing userspace code in Linux should generally be tagged [linux] instead. Since the internals of the Linux kernel are constantly changing, it is helpful to include the precise kernel version(s) that you are interested in.
This tag is for questions about the internals of the Linux kernel itself - particularly about writing code that runs within the context of the kernel (like kernel modules or drivers).
Questions about writing userspace code in Linux should generally be tagged linux instead. Since the internals of the Linux kernel are constantly changing, it is helpful to include the precise kernel version(s) that you are interested in.
The linux kernel is a UNIX-like kernel initially created by Linus Torvalds in 1991 and now is maintained by developers around the world.
Frequently Asked Questions
- What are high memory and low memory on Linux? (Unix&Linux SE)
- How can I find the implementations of Linux kernel system calls? (Unix&Linux SE)
- How do I read from /proc/$pid/mem under Linux? (Unix&Linux SE)
- Read/write files within a Linux kernel module
- Linux kernel "historical" git repository with full history
- What are vdso and vsyscall?
- Proper way of getting the address of non-exported kernel symbols in a Linux kernel module?
- Syscall hooking example?
Online resources
- The Linux Kernel documentation
- Minimal requirements to compile the kernel
- How to: Building the kernel
- How to: Building external kernel modules
- Linux Kernel Labs: collection of (written) theoretical lectures and labs, with walkthroughs and hands-on exercises
- Ubuntu Wiki - Kernel
- kernelnewbies: resources for programmers new to kernel hacking/developement
- LWN - Linux Weekly News: kernel evolutions explained, news about what is happening in the Linux kernel development communities.
- Linux Driver Template: useful template for beginners in Linux device driver development
Books
- LDD3 - Linux Device Drivers 3rd edition (2005): introduction to writing device drivers for the Linux kernel, available online for free, based on Linux 2.6.10
- Understanding the Linux Kernel 3rd edition (2005): a tour of the most significant data structures, algorithms, and programming tricks used in the kernel
- Understanding the Linux Virtual Memory Manager (2007): HTML, PDF
- Linux Kernel in a Nutshell: basics and prerequisites for the kernel
Kernel source code and source code browsers
- Official git repositories (GitWeb): torvalds/linux (vX.Y only), stable/linux (vX.Y.Z)
- LXR Cross Referencer: cross-refs, code search, freetext search (source)
- Elixir Cross Referencer: cross-refs, code search, syntax highlighting (source)
- sbexr: cross-refs, code search, freetext search, syntax highlighting (source)
- livegrep: regular expression search, links to GitHub mirror repo (source)
- LKDDB - Linux Kernel Driver Database: index of Linux kernel configuration options with description and version tracking
Further reading
Mailing lists
- LKML - the linux-kernel mailing list: a high-volume high-technicity discussion list (archives at lkml.org)
- kernelnewbies mailing list: medium-volume ML for beginners (archives)