13

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.

Neil
  • 2,425
  • 8
  • 36
  • 45

2 Answers2

21

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.

Ian Kelling
  • 2,661
  • 6
  • 23
  • 21
4

Try:

strings some_module.ko | grep vermagic

Or use as mentioned by Ian Kelling modinfo.

Node
  • 1,644
  • 1
  • 13
  • 15
  • 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 06 '15 at 20:08