Find Out Linux Kernel Modules ( Drivers ) Location / Directory
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:
- Linux: How to load a kernel module automatically at boot time
- Howto: Display list of modules or device drivers in the Linux Kernel
- CentOS Linux install kernel headers to build vmware / 3rd party modules
- Linux: Find out Ethernet card driver name
- How to: Linux delete or remove kernel
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!
Tags: /lib/modules/$(uname -r), command cd, configuration file, display driver location, display modules location, kernel driver, kernel version, lib, Linux, ls command, modprobe command, module directory, pwd command, version directory ~ Last updated on: March 13, 2008



Recent Comments
Today ~ 19 Comments
Today ~ 2 Comments
Today ~ 37 Comments
Today ~ 46 Comments
Yesterday ~ 2 Comments