1

I made a small kernel module called hello.ko, and inserted it via insmod command and removed it via rmmod command.

Now I want to insert this module via the modprobe command. I copied the hello.ko file to /lib/modules/4.13.0-31-generic/ directory and the keyed in the command sudo modprobe hello.ko in the linux terminal and got the following error :

modprobe: FATAL: Module hello.ko not found in directory /lib/modules/4.13.0-31-generic

Kindly let me know where I am going wrong and how to insert a kernel module via the modprobe command.

vinod maverick
  • 670
  • 4
  • 14
Khilav
  • 91
  • 11

1 Answers1

1

Try to do: "depmod -a" and then "sudo modprobe hello".

user2699113
  • 4,262
  • 3
  • 25
  • 43