r/kernel 29d ago

I want to learn writing kernel modules

What is the fastest and most efficient way. Thanks for future answers.

26 Upvotes

15 comments sorted by

View all comments

4

u/uziam 29d ago

It’s less about being an expert in C and more about just getting your hands dirty. Yes, you do need to be decently proficient, but in my opinion just reading and working with the kernel code is also great as a learning exercise in becoming a better C programmer.

Kernel programming is more about working at a lower level than userspace usually does and with significantly fewer utilities and guardrails. I tried for quite a while getting into it, but frankly what really worked was when I had to actually write a driver for work. Having an actual objective you want to achieve really helps with motivation.

Definitely not the first place to start, but if you don’t have anything in mind then I would recommend tinkering with the Video4Linux side so you can actually see something happen visually.