{"id":672,"date":"2018-10-18T07:23:23","date_gmt":"2018-10-18T07:23:23","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=672"},"modified":"2018-10-18T15:39:26","modified_gmt":"2018-10-18T15:39:26","slug":"how-do-i-display-the-list-of-loaded-linux-kernel-modules-or-device-drivers-on-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/how-do-i-display-the-list-of-loaded-linux-kernel-modules-or-device-drivers-on-linux\/","title":{"rendered":"How do I display the list of loaded Linux Kernel modules or device drivers on Linux ?"},"content":{"rendered":"<p>You need to use lsmod program which show the status of loaded modules in the Linux Kernel. Linux kernel use a term modules for all hardware device drivers.Please note that lsmod is a trivial program which nicely formats the contents of the \/proc\/modules, showing what kernel modules are currently loaded.<\/p>\n<h2>Module Commands<\/h2>\n<p>There are a few commands that allow you to maniuplate the kernel. Each is quickly described below, for more information say `man [command]`.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>depmod &#8211; handle dependency descriptions for loadable kernel modules.<\/li>\n<li>insmod &#8211; install loadable kernel module.<\/li>\n<li>lsmod &#8211; list loaded modules.<\/li>\n<li>modinfo &#8211; display information about a kernel module.<\/li>\n<li>modprobe &#8211; high level handling of loadable modules.<\/li>\n<li>rmmod &#8211; unload loadable modules.<\/li>\n<\/ul>\n<h2><b>List or display loaded modules<\/b><\/h2>\n<p><b>Method 1:<\/b> less \/proc\/modulesram@linuxforfreshers.com#less \/proc\/modulesuas 24576 0 &#8211; Live 0x0000000000000000usb_storage 69632 1 uas, Live 0x0000000000000000bridge 126976 0 &#8211; Live 0x0000000000000000stp 16384 1 bridge, Live 0x0000000000000000llc 16384 2 bridge,stp, Live 0x0000000000000000xt_CHECKSUM 16384 3 &#8211; Live 0x0000000000000000ipt_MASQUERADE 16384 9 &#8211; Live 0x0000000000000000nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE, Live 0x0000000000000000ebtable_nat 16384 0 &#8211; Live 0x0000000000000000ebtables 36864 1 ebtable_nat, Live 0x0000000000000000nf_log_ipv4 16384 0 &#8211; Live 0x0000000000000000nf_log_common 16384 1 nf_log_ipv4, Live 0x0000000000000000xt_tcpudp 16384 13 &#8211; Live 0x0000000000000000ip6table_mangle 16384 0 &#8211; Live 0x0000000000000000iptable_nat 16384 1 &#8211; Live 0x0000000000000000nf_conntrack_ipv4 16384 3 &#8211; Live 0x0000000000000000ram@linuxforfreshers.com# lsmod | tail -10hid_generic 16384 0 usbhid 49152 0 psmouse 126976 0 hid 118784 2 hid_generic,usbhidpata_acpi 16384 0 floppy 73728 0 fjes 28672 0 e1000e 233472 0 ptp 20480 1 e1000epps_core 20480 1 ptp<\/p>\n<h3><b>Finding more info about any module or driver<\/b><\/h3>\n<p><b>Syntax:<\/b> modinfo driver-Name-Hereram@linuxforfreshers.com#modinfo e1000efilename: \/lib\/modules\/4.4.0-59-generic\/kernel\/drivers\/net\/ethernet\/intel\/e1000e\/e1000e.kodescription: Intel(R) PRO\/1000 Network Driverauthor: Intel Corporation, &lt;linux.nics@intel.com&gt;srcversion: 8D9E9AFD67E40CA48E61582alias: pci:v00008086d000015D6sv*sd*bc*sc*i*alias: pci:v00008086d000015E3sv*sd*bc*sc*i*alias: pci:v00008086d000015D8sv*sd*bc*sc*i*alias: pci:v00008086d000015D7sv*sd*bc*sc*i*alias: pci:v00008086d000015B9sv*sd*bc*sc*i*alias: pci:v00008086d000015B8sv*sd*bc*sc*i*alias: pci:v00008086d000015B7sv*sd*bc*sc*i*alias: pci:v00008086d00001570sv*sd*bc*sc*i*alias: pci:v00008086d0000156Fsv*sd*bc*sc*i*alias: pci:v00008086d000015A3sv*sd*bc*sc*i*alias: pci:v00008086d000015A2sv*sd*bc*sc*i*alias: pci:v00008086d000015A1sv*sd*bc*sc*i*alias: pci:v00008086d000015A0sv*sd*bc*sc*i*alias: pci:v00008086d00001559sv*sd*bc*sc*i*alias: pci:v00008086d0000155Asv*sd*bc*sc*i*alias: pci:v00008086d0000153Bsv*sd*bc*sc*i*alias: pci:v00008086d0000153Asv*sd*bc*sc*i*alias: pci:v00008086d00001503sv*sd*bc*sc*i*alias: pci:v00008086d00001502sv*sd*bc*sc*i*alias: pci:v00008086d000010F0sv*sd*bc*sc*i*alias: pci:v00008086d000010EFsv*sd*bc*sc*i*alias: pci:v00008086d000010EBsv*sd*bc*sc*i*alias: pci:v00008086d000010EAsv*sd*bc*sc*i*alias: pci:v00008086d00001525sv*sd*bc*sc*i*alias: pci:v00008086d000010DFsv*sd*bc*sc*i*alias: pci:v00008086d000010DEsv*sd*bc*sc*i*alias: pci:v00008086d000010CEsv*sd*bc*sc*i*alias: pci:v00008086d000010CDsv*sd*bc*sc*i*alias: pci:v00008086d000010CCsv*sd*bc*sc*i*alias: pci:v00008086d000010CBsv*sd*bc*sc*i*alias: pci:v00008086d000010F5sv*sd*bc*sc*i*alias: pci:v00008086d000010BFsv*sd*bc*sc*i*alias: pci:v00008086d000010E5sv*sd*bc*sc*i*alias: pci:v00008086d0000294Csv*sd*bc*sc*i*alias: pci:v00008086d000010BDsv*sd*bc*sc*i*alias: pci:v00008086d000010C3sv*sd*bc*sc*i*alias: pci:v00008086d000010C2sv*sd*bc*sc*i*alias: pci:v00008086d000010C0sv*sd*bc*sc*i*alias: pci:v00008086d00001501sv*sd*bc*sc*i*alias: pci:v00008086d00001049sv*sd*bc*sc*i*alias: pci:v00008086d0000104Dsv*sd*bc*sc*i*alias: pci:v00008086d0000104Bsv*sd*bc*sc*i*alias: pci:v00008086d0000104Asv*sd*bc*sc*i*alias: pci:v00008086d000010C4sv*sd*bc*sc*i*alias: pci:v00008086d000010C5sv*sd*bc*sc*i*alias: pci:v00008086d0000104Csv*sd*bc*sc*i*alias: pci:v00008086d000010BBsv*sd*bc*sc*i*alias: pci:v00008086d00001098sv*sd*bc*sc*i*alias: pci:v00008086d000010BAsv*sd*bc*sc*i*alias: pci:v00008086d00001096sv*sd*bc*sc*i*alias: pci:v00008086d0000150Csv*sd*bc*sc*i*alias: pci:v00008086d000010F6sv*sd*bc*sc*i*alias: pci:v00008086d000010D3sv*sd*bc*sc*i*alias: pci:v00008086d0000109Asv*sd*bc*sc*i*alias: pci:v00008086d0000108Csv*sd*bc*sc*i*alias: pci:v00008086d0000108Bsv*sd*bc*sc*i*alias: pci:v00008086d0000107Fsv*sd*bc*sc*i*alias: pci:v00008086d0000107Esv*sd*bc*sc*i*alias: pci:v00008086d0000107Dsv*sd*bc*sc*i*alias: pci:v00008086d000010B9sv*sd*bc*sc*i*alias: pci:v00008086d000010D5sv*sd*bc*sc*i*alias: pci:v00008086d000010DAsv*sd*bc*sc*i*alias: pci:v00008086d000010D9sv*sd*bc*sc*i*alias: pci:v00008086d00001060sv*sd*bc*sc*i*alias: pci:v00008086d000010A5sv*sd*bc*sc*i*alias: pci:v00008086d000010BCsv*sd*bc*sc*i*alias: pci:v00008086d000010A4sv*sd*bc*sc*i*alias: pci:v00008086d0000105Fsv*sd*bc*sc*i*alias: pci:v00008086d0000105Esv*sd*bc*sc*i*vermagic: 4.4.0-59-generic SMP mod_unload modversions parm: debug:Debug level (0=none,&#8230;,16=all) (int)parm: copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)parm: TxIntDelay:Transmit Interrupt Delay (array of int)parm: TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)parm: RxIntDelay:Receive Interrupt Delay (array of int)parm: RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)parm: InterruptThrottleRate:Interrupt Throttling Rate (array of int)parm: IntMode:Interrupt Mode (array of int)parm: SmartPowerDownEnable:Enable PHY smart power down (array of int)parm: KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)parm: WriteProtectNVM:Write-protect NVM [WARNING: disabling this can lead to corrupted NVM] (array of int)parm: CrcStripping:Enable CRC Stripping, disable if your BMC needs the CRC (array of int)Using following command to find list of installed drivers.ls -l \/lib\/modules\/$(uname -r)\/kernel\/drivers\/ram@linuxforfreshers.com#ls \/lib\/modules\/$(uname -r)\/kernel\/drivers\/ | tail -10<\/p>\n<h2><b>What is the standard directory for driver files are stored?<\/b><\/h2>\n<p>Using following command u can get standard Directory for Driver files are stored.echo &#8220;Kernel drivers dir: &#8220;\/lib\/modules\/$(uname -r)\/kernel\/drivers\/&#8221; for Linux kernel version &#8220;$(uname -r)&#8221; &#8220;ram@linuxforfreshers.com#echo &#8220;Kernel drivers dir: &#8220;\/lib\/modules\/$(uname -r)\/kernel\/drivers\/&#8221; for Linux kernel version &#8220;$(uname -r)&#8221; &#8220;Kernel drivers dir: &#8220;\/lib\/modules\/4.4.0-59-generic\/kernel\/drivers\/&#8221; for Linux kernel version &#8220;4.4.0-59-generic&#8221;<\/p>\n<p><a href=\"https:\/\/www.linuxforfreshers.com\/2017\/09\/how-do-i-display-list-of-loaded-linux.html\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to use lsmod program which show the status of loaded modules in the Linux Kernel. Linux kernel use a term modules for all hardware device drivers.Please note that lsmod is a trivial program which nicely formats the contents of the \/proc\/modules, showing what kernel modules are currently loaded. Module Commands There are a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/how-do-i-display-the-list-of-loaded-linux-kernel-modules-or-device-drivers-on-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How do I display the list of loaded Linux Kernel modules or device drivers on Linux ?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-672","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=672"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":801,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/672\/revisions\/801"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}