lsmod/insmod commands are not working

Andy Green andy at warmcat.com
Tue Jul 31 09:26:29 UTC 2007


Somebody in the thread at some point said:
> MAHESH wrote:
>> i am using fedora 7 in my system its kernel version is 2.6 while
>> programming it is not executing the commands insmod & lsmod and when

> You probably want to install -devel {for compiling kernel module
> interfaces} or -headers {all}
> yum install kernel-devel or yum install kernel-headers

kernel-headers contains mutant kernel includes that have been "sanatized
for userspace", if he's trying to do "kernel level programming" then he
wants specifically the kernel-devel stuff.

But I think maybe he is telling us about a second problem.... insmod and
lsmod and so on live down /sbin, and only root has /sbin in its PATH by
default.  You can still run lsmod anyway as a normal user, but you will
have to run it as

/sbin/lsmod

or add /sbin to your PATH.  But really to do anything useful you will
want to run them as root, where you will also be able to run them
without giving the /sbin/ in front.

-Andy




More information about the fedora-list mailing list