2019-04-21 11:50:48 +08:00

22 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="rmmod">rmmod</h1>
<p>从运行的内核中移除指定的内核模块</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>rmmod命令</strong> 用于从当前运行的内核中移除指定的内核模块。执行rmmod指令可删除不需要的模块。Linux操作系统的核心具有模块化的特性应此在编译核心时务须把全部的功能都放如核心。你可以将这些功能编译成一个个单独的模块待有需要时再分别载入它们。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">rmmod(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-v显示指令执行的详细信息
-f强制移除模块使用此选项比较危险
-w等待着直到模块能够被除时在移除模块
-s向系统日志syslog发送错误信息。</code></pre>
<h3 id="参数">参数</h3>
<p>模块名:要移除的模块名称。</p>
<h3 id="实例">实例</h3>
<p>用rmmod命令主要用于卸载正在使用的Linux内核模块<code>modprobe -r</code>命令相似,如下所示:</p>
<pre><code class="language-bash">[root@localhost boot]# lsmod | grep raid1
raid1 25153 0
[root@localhost boot]# rmmod raid1
[root@localhost boot]# lsmod | grep raid1</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->