14

I know you can do:

sudo modprobe -v some_module

to check the version of /lib/modules/.../some_module.ko, but I'd still like to be able to check the version of any arbitrary kernel module that's not necessarily going to be loaded by modprobe.

2 Answers 2

22

modinfo(8)
modinfo - program to show information about a Linux Kernel module

Simply,

modinfo module-file

General tip: At the bottom of a manpage and there is a section called "See Also". For modprobe, it lists modinfo. That section can be extremely useful.

2
  • 1
    Hm, better than strings ;) +1
    – Node
    May 20, 2009 at 16:49
  • Curious why this doesn't work for me. It complains it can't find the file even though I checked it exists. Aug 20, 2018 at 11:52
4

Try:

strings some_module.ko | grep vermagic

Or use as mentioned by Ian Kelling modinfo.

1
  • I need this on a system without 'modinfo', so this was a good tip. For me, the command 'strings some_module.ko | grep version' actually returned the version of my module.
    – noisygecko
    Nov 6, 2015 at 20:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .