1
00:00:00,005 --> 00:00:02,008
- [Narrator] Where are these cool

2
00:00:02,008 --> 00:00:06,002
loadable kernel module files?

3
00:00:06,002 --> 00:00:07,005
What do they look like?

4
00:00:07,005 --> 00:00:10,003
Well, modules are installed into a directory

5
00:00:10,003 --> 00:00:14,002
under /lib/modules

6
00:00:14,002 --> 00:00:18,000
and under there should be a subdirectory

7
00:00:18,000 --> 00:00:20,003
for each kernel version you have installed.

8
00:00:20,003 --> 00:00:23,000
So the modules will be in the subdirectory

9
00:00:23,000 --> 00:00:26,002
for the kernel version they go with.

10
00:00:26,002 --> 00:00:28,001
Also, by the way,

11
00:00:28,001 --> 00:00:31,006
the directory has not only kernel module files,

12
00:00:31,006 --> 00:00:33,008
but it has configuration files having to do

13
00:00:33,008 --> 00:00:37,002
with those modules that include information, for example,

14
00:00:37,002 --> 00:00:40,009
about dependencies between modules.

15
00:00:40,009 --> 00:00:45,001
So module files are files, they should have a unique name.

16
00:00:45,001 --> 00:00:49,003
Now they can be in any directory underneath there,

17
00:00:49,003 --> 00:00:51,007
but generally there's some organization to it.

18
00:00:51,007 --> 00:00:54,000
There's sub directories under there

19
00:00:54,000 --> 00:00:56,007
for different kinds of modules.

20
00:00:56,007 --> 00:01:01,004
And we'll look at the mod probe command later.

21
00:01:01,004 --> 00:01:04,004
It finds the modules there.

22
00:01:04,004 --> 00:01:07,003
And remember, you only load modules into your kernel

23
00:01:07,003 --> 00:01:09,006
that were built for your kernel.

24
00:01:09,006 --> 00:01:14,000
And that means not only the version of your kernel,

25
00:01:14,000 --> 00:01:16,008
but how your kernel was configured.

26
00:01:16,008 --> 00:01:19,000
So be careful about that.

27
00:01:19,000 --> 00:01:23,000
And also remember, modules run in kernel mode

28
00:01:23,000 --> 00:01:25,001
with all the privileges.

29
00:01:25,001 --> 00:01:29,001
So it's somewhat of a dangerous thing to be

30
00:01:29,001 --> 00:01:33,006
writing custom modules or certainly loading the module

31
00:01:33,006 --> 00:01:36,001
that you got from someplace, right?

32
00:01:36,001 --> 00:01:38,000
This is kernel level code.

