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

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

@@ -3,9 +3,9 @@
<h2 id="补充说明">补充说明</h2>
<p><strong>ifconfig命令</strong> 被用于配置和显示Linux内核中网络接口的网络参数。用ifconfig命令配置的网卡信息在网卡重启后机器重启后配置就不存在。要想将上述的配置信息永远的存的电脑里那就要修改网卡的配置文件了。</p>
<h3 id="语法">语法</h3>
<pre><code>ifconfig(参数)</code></pre>
<pre><code class="language-bash">ifconfig(参数)</code></pre>
<h3 id="参数">参数</h3>
<pre><code>add&lt;地址&gt;设置网络设备IPv6的ip地址
<pre><code class="language-bash">add&lt;地址&gt;设置网络设备IPv6的ip地址
del&lt;地址&gt;删除网络设备IPv6的IP地址
down关闭指定的网络设备
&lt;hw&lt;网络设备类型&gt;&lt;硬件地址&gt;:设置网络设备的类型与硬件地址;
@@ -25,7 +25,7 @@ IP地址指定网络设备的IP地址
网络设备:指定网络设备的名称。</code></pre>
<h3 id="实例">实例</h3>
<p><strong>显示网络设备信息(激活状态的):</strong></p>
<pre><code>[root@localhost ~]# ifconfig
<pre><code class="language-bash">[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:00:1E:51
inet addr:10.160.7.81 Bcast:10.160.15.255 Mask:255.255.240.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
@@ -53,25 +53,25 @@ lo Link encap:Local Loopback
<li>第七行:接收、发送数据字节数统计信息。</li>
</ul>
<p><strong>启动关闭指定网卡:</strong></p>
<pre><code>ifconfig eth0 up
<pre><code class="language-bash">ifconfig eth0 up
ifconfig eth0 down</code></pre>
<p><code>ifconfig eth0 up</code>为启动网卡eth0<code>ifconfig eth0 down</code>为关闭网卡eth0。ssh登陆linux服务器操作要小心关闭了就不能开启了除非你有多网卡。</p>
<p><strong>为网卡配置和删除IPv6地址</strong></p>
<pre><code>ifconfig eth0 add 33ffe:3240:800:1005::2/64 #为网卡eth0配置IPv6地址
<pre><code class="language-bash">ifconfig eth0 add 33ffe:3240:800:1005::2/64 #为网卡eth0配置IPv6地址
ifconfig eth0 del 33ffe:3240:800:1005::2/64 #为网卡eth0删除IPv6地址</code></pre>
<p><strong>用ifconfig修改MAC地址</strong></p>
<pre><code>ifconfig eth0 hw ether 00:AA:BB:CC:dd:EE</code></pre>
<pre><code class="language-bash">ifconfig eth0 hw ether 00:AA:BB:CC:dd:EE</code></pre>
<p><strong>配置IP地址</strong></p>
<pre><code>[root@localhost ~]# ifconfig eth0 192.168.2.10
<pre><code class="language-bash">[root@localhost ~]# ifconfig eth0 192.168.2.10
[root@localhost ~]# ifconfig eth0 192.168.2.10 netmask 255.255.255.0
[root@localhost ~]# ifconfig eth0 192.168.2.10 netmask 255.255.255.0 broadcast 192.168.2.255</code></pre>
<p><strong>启用和关闭arp协议</strong></p>
<pre><code>ifconfig eth0 arp #开启网卡eth0 的arp协议
<pre><code class="language-bash">ifconfig eth0 arp #开启网卡eth0 的arp协议
ifconfig eth0 -arp #关闭网卡eth0 的arp协议</code></pre>
<p><strong>设置最大传输单元:</strong></p>
<pre><code>ifconfig eth0 mtu 1500 #设置能通过的最大数据包大小为 1500 bytes</code></pre>
<pre><code class="language-bash">ifconfig eth0 mtu 1500 #设置能通过的最大数据包大小为 1500 bytes</code></pre>
<p><strong>其它实例</strong></p>
<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="ex">ifconfig</span> #处于激活状态的网络接口</a>
<div class="sourceCode" id="cb10"><pre><code class="language-bash"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="ex">ifconfig</span> #处于激活状态的网络接口</a>
<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="ex">ifconfig</span> -a #所有配置的网络接口,不论其是否激活</a>
<a class="sourceLine" id="cb10-3" data-line-number="3"><span class="ex">ifconfig</span> eth0 #显示eth0的网卡信息</a></code></pre></div>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->