From the course: Advanced Linux: The Linux Kernel

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Using LKM Commands

Using LKM Commands

- [Instructor] Fun with modules. Let's look at commands related to working with loadable kernel modules. We'll start with lsmod, list the modules that are currently loaded into your kernel. These are listed chronologically. The top of the list there, in this case, vhost_net is the most recently loaded module. And then there's probably more than just four. The very last one would be the very first module loaded. And we can see there's actually four columns, but only three headers. The first column is the name of the module, so that would be typically the .ko name, and then size and bytes, and then a number, that's the use count. And then, after that is the used by column. So we see, for example here, macvtap is used by vhost_net and mtacvlan is used by macvtap. And we could tell by the order here that they have to be loaded in an order to satisfy these used by requirements. You remove a module with rmmod. It is possible to configure a kernel where you're not allowed to remove modules…

Contents