https://github.com/abund4nt/simple-kernel-module
Hello world Kernel Module Ubuntu 6.8.0-51-generic
https://github.com/abund4nt/simple-kernel-module
Last synced: 3 months ago
JSON representation
Hello world Kernel Module Ubuntu 6.8.0-51-generic
- Host: GitHub
- URL: https://github.com/abund4nt/simple-kernel-module
- Owner: abund4nt
- Created: 2024-10-24T03:43:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T01:47:45.000Z (6 months ago)
- Last Synced: 2025-01-11T05:18:50.063Z (5 months ago)
- Language: C
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple kernel module
Simple kernel module programmed for kernel version `6.8.0-51-generic`. This repository was created in order to understand how to program a kernel module, compile, load and remove it.
## Compilation processCompile the module using make
```shell
$ make
```Once compiled load it into the kernel
```shell
sudo insmod hello-1.ko
```Now using the `lsmod` command you can see it, if you want to see the `Hello World` string you can use `sudo dmesg`.
```shell
$ sudo dmesg
...
[ 7659.352222] Hello, world 2
...
```To remove the module from the kernel you can use `rmmod`.
```shell
$ sudo rmmod hello-1
```## References
- [The Linux Kernel Module Programming Guide](https://sysprog21.github.io/lkmpg/)