重新启动后,通过 insmod 命令安装的模块会保留吗?

apa*_*che 3 linux-kernel

我正在阅读的这本书是如何描述该insmod实用程序的:

该程序将模块代码和数据加载到内核中,内核又执行类似于 ld 的功能,因为它将模块中任何未解析的符号链接到内核的符号表。然而,与链接器不同的是,内核不会修改模块的磁盘文件,而是修改内存中的副本。

看起来它不会持续存在,因为它在内存中,但我不确定。

Kar*_*zak 6

不,他们不会。重新启动后,您将从头开始。

通常,对于您希望在每次重新启动后加载的模块,有一个配置文件列出要在启动时自动加载的模块。

看看/etc/modules

man modules

NAME
   /etc/modules - kernel modules to load at boot time

DESCRIPTION
   The  /etc/modules file contains the names of kernel modules that are to
   be loaded at boot time, one per line. Arguments can  be  given  in  the
   same line as the module name. Lines beginning with a '#' are ignored.
Run Code Online (Sandbox Code Playgroud)