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.