语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -4,9 +4,9 @@
<p><strong>modprobe命令</strong> 用于智能地向内核中加载模块或者从内核中移除模块。</p>
<p>modprobe可载入指定的个别模块或是载入一组相依的模块。modprobe会根据depmod所产生的相依关系决定要载入哪些模块。若在载入过程中发生错误在modprobe会卸载整组的模块。</p>
<h3 id="语法">语法</h3>
<pre><code>modprobe(选项)(参数)</code></pre>
<pre><code class="language-bash">modprobe(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code>-a或--all载入全部的模块
<pre><code class="language-bash">-a或--all载入全部的模块
-c或--show-conf显示所有模块的设置信息
-d或--debug使用排错模式
-l或--list显示可用的模块
@@ -19,17 +19,17 @@
<p>模块名:要加载或移除的模块名称。</p>
<h3 id="实例">实例</h3>
<p><strong>查看modules的配置文件</strong></p>
<pre><code>modprobe -c</code></pre>
<pre><code class="language-bash">modprobe -c</code></pre>
<p>这里可以查看modules的配置文件比如模块的alias别名是什么等。会打印许多行信息例如其中的一行会类似如下</p>
<pre><code>alias symbol:ip_conntrack_unregister_notifier ip_conntrack</code></pre>
<pre><code class="language-bash">alias symbol:ip_conntrack_unregister_notifier ip_conntrack</code></pre>
<p><strong>列出内核中所有已经或者未挂载的所有模块:</strong></p>
<pre><code>modprobe -l</code></pre>
<pre><code class="language-bash">modprobe -l</code></pre>
<p>这里,我们能查看到我们所需要的模块,然后根据我们的需要来挂载;其实<code>modprobe -l</code>读取的模块列表就位于/lib/modules/`uname -r `目录中;其中<code>uname -r</code>是内核的版本,例如输出结果的其中一行是:</p>
<pre><code>/lib/modules/2.6.18-348.6.1.el5/kernel/net/netfilter/xt_statistic.ko</code></pre>
<pre><code class="language-bash">/lib/modules/2.6.18-348.6.1.el5/kernel/net/netfilter/xt_statistic.ko</code></pre>
<p><strong>挂载vfat模块</strong></p>
<pre><code>modprobe vfat</code></pre>
<pre><code class="language-bash">modprobe vfat</code></pre>
<p>这里,使用格式<code>modprobe 模块名</code>来挂载一个模块。挂载之后用lsmod可以查看已经挂载的模块。模块名是不能带有后缀的我们通过<code>modprobe -l</code>所看到的模块,都是带有<code>.ko</code><code>.o</code>后缀。</p>
<p><strong>移除已经加载的模块:</strong></p>
<pre><code>modprobe -r 模块名</code></pre>
<pre><code class="language-bash">modprobe -r 模块名</code></pre>
<p>这里移除已加载的模块和rmmod功能相同。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->