About Linux FAQ

Browse More FAQs:

Find Out Linux Kernel Modules ( Drivers ) Location / Directory

Posted by Vivek on Thursday March 13, 08 @5:11 pm

Q. Can you tell me exact location of Linux kernel driver under Linux file system? Where to find all available modules?

A. /lib/modules/kernel-version/ directory stores all compiled drivers under Linux operating system. You can use modprobe command to intelligently add or remove a module from the Linux kernel. modprobe looks in the
module directory /lib/modules/$(uname -r) for all the modules and other files, except for the optional /etc/modprobe.conf configuration file and /etc/modprobe.d directory. Type the following command to display current modules:
$ ls -l /lib/modules/$(uname -r)
Sample output:

total 1720
lrwxrwxrwx  1 root root     40 2007-10-17 10:00 build -> /usr/src/linux-headers-2.6.22-14-generic
drwxr-xr-x  2 root root   4096 2007-12-19 10:41 initrd
drwxr-xr-x 10 root root   4096 2007-10-17 09:58 kernel
-rw-r--r--  1 root root 363419 2008-01-26 18:10 modules.alias
-rw-r--r--  1 root root     69 2008-01-26 18:10 modules.ccwmap
-rw-r--r--  1 root root 395238 2008-01-26 18:10 modules.dep
-rw-r--r--  1 root root    813 2008-01-26 18:10 modules.ieee1394map
-rw-r--r--  1 root root    527 2008-01-26 18:10 modules.inputmap
-rw-r--r--  1 root root  17714 2008-01-26 18:10 modules.isapnpmap
-rw-r--r--  1 root root     74 2008-01-26 18:10 modules.ofmap
-rw-r--r--  1 root root 270824 2008-01-26 18:10 modules.pcimap
-rw-r--r--  1 root root   1345 2008-01-26 18:10 modules.seriomap
-rw-r--r--  1 root root 165591 2008-01-26 18:10 modules.symbols
-rw-r--r--  1 root root 479477 2008-01-26 18:10 modules.usbmap
drwxr-xr-x 10 root root   4096 2007-10-17 09:59 ubuntu

You can change directory by typing following command:
$ cd /lib/modules/$(uname -r)
$ pwd

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Linux / UNIX FAQ:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , ~ Last updated on: March 13, 2008

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.