I apologize if the query is too simple. But I want to ask is there a difference between linux system modules and linux kernel modules. If there is a difference then where are both located. Is it that /lib/module/$(uname -r) shows kernel modules and /sys/module/ shows system modules
difference between /lib/module/$(uname -r) and /sys/module
linux;kernel modules
The directory /sys/module/ shows all modules in the system by their name as folders with diverse information needed by the system. The directory /lib/module/$(uname -r) contains the kernel module files, stored in a folder hierarchy according to their function.For example, the Software Watchdog kernel module file would be in /lib/module/$(uname -r)/kernel/drivers/watchdog/softdog.ko. On the other hand, this module has its own softdog (the module name) directory in /sys/module/ with information used by the system when operating/inserting this module, but not the file of the module itself. You can operate modules by name with modprobe [args] <module-name> [module-params]You can operate modules by path to the .ko file with insmod [args] <path> [module-params].Mind that operating kernel modules requires root privileges.