0

I am using Ubuntu-11.04 OS. i wrote a basic interactive kernel module mid.c

#include<linux/kernel.h> #include<linux/module.h> #include<linux/init.h> static int __init insert(void) { pr_info(" The module is inserted into the kernel \n"); return 0; } static void __exit remove(void) { pr_info("the module is removed from kernel \n"); } module_init(insert); module_exit(remove); 

i can compile the module by using the command

make -C /lib/modules/2.6.38-8-generic/build M=$(PWD) modules 

but when i try to insert the module using the command

insmod mod.ko 

an error occurs saying :

cannot insert mod.ko permission denied 
1
  • Did you google the error message? That would have been probably quicker than asking here. Commented May 20, 2011 at 10:05

1 Answer 1

4

you need to add a sudo before insmod

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.