<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Operation (系统操作) &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-2021-12.github.io/category/system/system-operation-system-setting-system-software/system-operation/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-2021-12.github.io/</link>
	<description></description>
	<lastBuildDate>Sun, 26 Dec 2021 08:41:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[命令] Linux 命令 ssh （远程登录）</title>
		<link>https://eternalcenter-2021-12.github.io/ssh/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 26 Nov 2021 15:56:06 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=19146</guid>

					<description><![CDATA[案例一：脚本中常用的方式 （补充：这里以1) 安静模式2) 打开新端口的模式3) 不检查服务器记录4) 超时时间为 5 秒5) 通过 eternalcenter 用户6) 登录 eternalcenter.com 服务器为例） 案例二：在操作中常用的方式 （补充：这里以1) 带图形的模式2) 通过 eternalcenter 用户3) 登录 eternalcenter.com 服务器为例）]]></description>
										<content:encoded><![CDATA[
<h2>案例一：脚本中常用的方式</h2>



<pre class="wp-block-code"><code># ssh -q -t -t -o StrictHostKeyChecking=no -o ConnectTimeout=5 -l eternalcenter eternalcenter.com</code></pre>



<p>（<br>补充：这里以<br>1) 安静模式<br>2) 打开新端口的模式<br>3) 不检查服务器记录<br>4) 超时时间为 5 秒<br>5) 通过 eternalcenter 用户<br>6) 登录 eternalcenter.com 服务器<br>为例<br>）</p>



<h2>案例二：在操作中常用的方式</h2>



<pre class="wp-block-code"><code># ssh -X eternalcenter@eternalcenter.com</code></pre>



<p>（<br>补充：这里以<br>1) 带图形的模式<br>2) 通过 eternalcenter 用户<br>3) 登录 eternalcenter.com 服务器<br>为例<br>）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 uniq （文件里字符重复的管理）</title>
		<link>https://eternalcenter-2021-12.github.io/uniq/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 26 Nov 2021 14:17:52 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=19136</guid>

					<description><![CDATA[案例一：uniq 命令去重 （补充：这里以给 test.txt 文件里的字符为例） 案例二：uniq 只显示重复的行 （补充：这里以只显示 test.txt 文件里重复的行为例） 案例三：uniq 只显示不重复的行 （补充：这里以只显示 test.txt 文件里不重复的行为例） 案例四：显示每个字符出现的次数 （补充：这里以显示 test.txt 每个字符出现的次数为例）]]></description>
										<content:encoded><![CDATA[
<h4>案例一：uniq 命令去重</h4>



<pre class="wp-block-code"><code># cat test.txt 
a1
b2
c3
a1
d2
e3
a1
c3

# sort test.txt  | uniq
a1
b2
c3
d2
e3</code></pre>



<p>（补充：这里以给 test.txt 文件里的字符为例）</p>



<h4>案例二：uniq 只显示重复的行</h4>



<pre class="wp-block-code"><code># cat test.txt 
a1
b2
c3
a1
d2
e3
a1
c3

# sort test.txt  | uniq -d
a1
c3</code></pre>



<p>（补充：这里以只显示 test.txt 文件里重复的行为例）</p>



<h4>案例三：uniq 只显示不重复的行</h4>



<pre class="wp-block-code"><code># cat test.txt 
a1
b2
c3
a1
d2
e3
a1
c3

# sort test.txt  | uniq -u
b2
d2
e3</code></pre>



<p>（补充：这里以只显示 test.txt 文件里不重复的行为例）</p>



<h4>案例四：显示每个字符出现的次数</h4>



<pre class="wp-block-code"><code># cat test.txt 
a1
b2
c3
a1
d2
e3
a1
c3

# sort test.txt  | uniq -c
      3 a1
      1 b2
      2 c3
      1 d2
      1 e3</code></pre>



<p>（补充：这里以显示 test.txt 每个字符出现的次数为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 关机或重启记录的查看</title>
		<link>https://eternalcenter-2021-12.github.io/viewing-of-shutdown-or-restart-records/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 10 Nov 2021 13:09:21 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=18281</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code># /usr/bin/last -xF | egrep "reboot|shutdown|runlevel|system"</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 进程修正值 （nice 值） 的设置</title>
		<link>https://eternalcenter-2021-12.github.io/nice/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Nov 2021 15:38:02 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Process (系统进程)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=18158</guid>

					<description><![CDATA[内容目录： 内容一：进程优先级和修正值（nice 值）的关系1.1 进程优先级的作用1.2 进程优先级和修正值（nice 值）的关系1.3 修正值（nice 值）的范围 内容二：修正值（nice 值）的设置2.1 设置修正值（nice 值）的格式2.2 设置修正值（nice 值）的案例 内容三：查看进程的修正值 具体的内容： 内容一：进程优先级和修正值（nice 值）的关系1.1 进程优先级的作用 进程的真正优先级越小，则此进程则越能优先被执行 1.2 进程优先级和修正值（nice 值）的关系 进程的真正优先级 = 进程默认优先级 + 修正值（nice 值） 1.3 修正值（nice 值）的范围 从 -20 到 +19 内容二：修正值（nice 值）的设置2.1 设置修正值（nice 值）的格式 或者： 或者： 2.2 设置修正值（nice 值）的案例 或者： 或者： （注意：这里的 -10 不是指负数 10 而是指正数 10） （补充：这里以修正值为 10 &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/nice/" class="more-link">Continue reading<span class="screen-reader-text"> "[内容] Linux 进程修正值 （nice 值） 的设置"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h2>内容目录：</h2>



<h4>内容一：进程优先级和修正值（nice 值）的关系<br>1.1 进程优先级的作用<br>1.2 进程优先级和修正值（nice 值）的关系<br>1.3 修正值（nice 值）的范围</h4>



<h4>内容二：修正值（nice 值）的设置<br>2.1 设置修正值（nice 值）的格式<br>2.2 设置修正值（nice 值）的案例</h4>



<h4>内容三：查看进程的修正值</h4>



<h2>具体的内容：</h2>



<h4>内容一：进程优先级和修正值（nice 值）的关系<br>1.1 进程优先级的作用</h4>



<p>进程的真正优先级越小，则此进程则越能优先被执行</p>



<h4>1.2 进程优先级和修正值（nice 值）的关系</h4>



<p>进程的真正优先级 = 进程默认优先级 + 修正值（nice 值）</p>



<h4>1.3 修正值（nice 值）的范围</h4>



<p>从 -20 到 +19</p>



<h4>内容二：修正值（nice 值）的设置<br>2.1 设置修正值（nice 值）的格式</h4>



<pre class="wp-block-code"><code># nice -n &lt;correction value&gt; &lt;command&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># nice --adjustment=&lt;correction value&gt; &lt;command&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># nice -&lt;correction value&gt; &lt;command&gt;</code></pre>



<h4>2.2 设置修正值（nice 值）的案例</h4>



<pre class="wp-block-code"><code># nice -n 10 top</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># nice --adjustment=10 top</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># nice -10 top</code></pre>



<p>（注意：这里的 -10 不是指负数 10 而是指正数 10）</p>



<p>（补充：这里以修正值为 10 启动 top 命令为例）</p>



<h4>内容三：查看进程的修正值</h4>



<pre class="wp-block-code"><code># top</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># ps -ef</code></pre>



<p>（<br>补充：<br>1) PRI 代表进程默认的优先级<br>2) NI 代表进程的修正值（nice 值）<br>3) 进程的真正优先级 = PRI + NI<br>4) 如果多个进程的真正优先级一样，则 root 用户的进程被优先执行<br>）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 sort（对数字或字母进行排序）</title>
		<link>https://eternalcenter-2021-12.github.io/sort/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 07 Oct 2021 13:56:39 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=18091</guid>

					<description><![CDATA[内容目录： 内容一：sort 命令的选项 内容二：sort 排序的案例2.1 案例一：检查是否已经排序2.2 案例二：sort 排序一列数字2.3 案例三：sort 排序一列字母2.4 案例四：sort 以相反的顺序进行排序2.5 案例五：sort 以 2 列中的第 1 列进行排序2.6 案例六：sort 以 2 列中的第 2 列进行排序2.7 案例七：sort 对 IP 地址进行排序2.8 案例八：sort 以 IP 地址的第三组数字进行排序 具体的内容： 内容一：sort 命令的选项 1) -b 排序时忽略每行前面的空格2) -c 检查是否已排序3) -f 排序时忽略大小写字母4) -n 按照数值到大小进行排序5) -o 将排序结果导入到指定文件6) -r 以相反的顺序进行排序7) -t 指定排序的分隔符8) -k 以指定的列进行排序 内容二：sort 排序的案例2.1 案例一：检查是否已经排序 &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/sort/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 sort（对数字或字母进行排序）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h2>内容目录：</h2>



<h4>内容一：sort 命令的选项</h4>



<h4>内容二：sort 排序的案例<br>2.1 案例一：检查是否已经排序<br>2.2 案例二：sort 排序一列数字<br>2.3 案例三：sort 排序一列字母<br>2.4 案例四：sort 以相反的顺序进行排序<br>2.5 案例五：sort 以 2 列中的第 1 列进行排序<br>2.6 案例六：sort 以 2 列中的第 2 列进行排序<br>2.7 案例七：sort 对 IP 地址进行排序<br>2.8 案例八：sort 以 IP 地址的第三组数字进行排序</h4>



<h2>具体的内容：</h2>



<h4>内容一：sort 命令的选项</h4>



<p>1) -b 排序时忽略每行前面的空格<br>2) -c 检查是否已排序<br>3) -f 排序时忽略大小写字母<br>4) -n 按照数值到大小进行排序<br>5) -o 将排序结果导入到指定文件<br>6) -r 以相反的顺序进行排序<br>7) -t 指定排序的分隔符<br>8) -k 以指定的列进行排序</p>



<h4>内容二：sort 排序的案例<br>2.1 案例一：检查是否已经排序</h4>



<pre class="wp-block-code"><code># cat test.txt
3
5
4
2
1

# sort -c test.txt 
sort: test.txt:3: disorder: 4</code></pre>



<p>（补充：这里以检查 test.txt 文件里的排列为例）</p>



<h4>2.2 案例二：sort 排序一列数字</h4>



<pre class="wp-block-code"><code># cat test.txt
3
5
4
2
20
1

# sort -n test.txt 
1
2
3
4
5
20</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.3 案例三：sort 排序一列字母</h4>



<pre class="wp-block-code"><code># cat test.txt 
c
e
d
b
a

# sort test.txt 
a
b
c
d
e</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.4 案例四：sort 以相反的顺序进行排序</h4>



<pre class="wp-block-code"><code># cat test.txt 
c
e
d
b
a

# sort -r test.txt 
e
d
c
b
a</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.5 案例五：sort 以 2 列中的第 1 列进行排序</h4>



<pre class="wp-block-code"><code># cat test.txt 
3 d
5 c
4 a
2 e
1 b

# sort test.txt 
1 b
2 e
3 d
4 a
5 c</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.6 案例六：sort 以 2 列中的第 2 列进行排序</h4>



<pre class="wp-block-code"><code># cat test.txt 
3 d
5 c
4 a
2 e
1 b

# sort -k2 test.txt 
4 a
1 b
5 c
3 d
2 e</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.7 案例七：sort 对 IP 地址进行排序</h4>



<pre class="wp-block-code"><code># cat test.txt 
10.0.200.10
172.16.50.10
192.168.100.1
192.168.100.10
172.16.50.1
10.0.200.1

# sort test.txt
10.0.200.1
10.0.200.10
172.16.50.1
172.16.50.10
192.168.100.1
192.168.100.10</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>



<h4>2.8 案例八：sort 以 IP 地址的第三组数字进行排序</h4>



<pre class="wp-block-code"><code># cat test.txt 
10.0.200.10
172.16.50.10
192.168.100.1
192.168.100.10
172.16.50.1
10.0.200.1

# sort -t'.' -k3n test.txt
172.16.50.1
172.16.50.10
192.168.100.1
192.168.100.10
10.0.200.1
10.0.200.10</code></pre>



<p>（补充：这里以排列 test.txt 文件里的列为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 输出信息的重定向</title>
		<link>https://eternalcenter-2021-12.github.io/redirect/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 05 Oct 2021 14:18:59 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=18085</guid>

					<description><![CDATA[内容目录： 内容一：以清空原文的方式进行输出信息的重定向1.1 以清空原文的方式将所有的输出信息重定向到某一个文件1.2 以清空原文的方式只将正确的输出信息重定向到某一个文件1.3 以清空原文的方式只将错误的输出信息重定向到某一个文件 内容二：以在原文后面追加的方式进行输出信息的重定向2.1 以在原文后面追加的方式将所有的输出信息重定向到某一个文件2.2 以在原文后面追加的方式只将正确的输出信息重定向到某一个文件2.3 以在原文后面追加的方式只将错误的输出信息重定向到某一个文件 内容三：通过重定向转换输出信息的正误3.1 将错误的输出信息重定向成正确的输出信息3.2 将正确的输出信息重定向成错误的输出信息 内容四：将输出信息重定向到黑洞 具体的内容： 内容一：以清空原文的方式进行输出信息的重定向1.1 以清空原文的方式将所有的输出信息重定向到某一个文件 或者： 1.2 以清空原文的方式只将正确的输出信息重定向到某一个文件 或者： 1.3 以清空原文的方式只将错误的输出信息重定向到某一个文件 内容二：以在原文后面追加的方式进行输出信息的重定向2.1 以在原文后面追加的方式将所有的输出信息重定向到某一个文件 或者： 2.2 以在原文后面追加的方式只将正确的输出信息重定向到某一个文件 或者： 2.3 以在原文后面追加的方式只将错误的输出信息重定向到某一个文件 内容三：通过重定向转换输出信息的正误3.1 将错误的输出信息重定向成正确的输出信息 或者： 3.2 将正确的输出信息重定向成错误的输出信息 或者： 内容四：将输出信息重定向到黑洞 或者： 或者： 或者： 或者： 或者： 或者： 或者： 或者： 或者： 或者： 或者： （补充：通过此种方法输出信息就既不会显示出来也不会被重定向到一个文件里）]]></description>
										<content:encoded><![CDATA[
<h2>内容目录：</h2>



<h4>内容一：以清空原文的方式进行输出信息的重定向<br>1.1 以清空原文的方式将所有的输出信息重定向到某一个文件<br>1.2 以清空原文的方式只将正确的输出信息重定向到某一个文件<br>1.3 以清空原文的方式只将错误的输出信息重定向到某一个文件</h4>



<h4>内容二：以在原文后面追加的方式进行输出信息的重定向<br>2.1 以在原文后面追加的方式将所有的输出信息重定向到某一个文件<br>2.2 以在原文后面追加的方式只将正确的输出信息重定向到某一个文件<br>2.3 以在原文后面追加的方式只将错误的输出信息重定向到某一个文件</h4>



<h4>内容三：通过重定向转换输出信息的正误<br>3.1 将错误的输出信息重定向成正确的输出信息<br>3.2 将正确的输出信息重定向成错误的输出信息</h4>



<h4>内容四：将输出信息重定向到黑洞</h4>



<h2>具体的内容：</h2>



<h4>内容一：以清空原文的方式进行输出信息的重定向<br>1.1 以清空原文的方式将所有的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; &amp;&gt; &lt;file&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt;&amp; &lt;file&gt;</code></pre>



<h4>1.2 以清空原文的方式只将正确的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt; &lt;file&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt; &lt;file&gt;</code></pre>



<h4>1.3 以清空原文的方式只将错误的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt; &lt;file&gt;</code></pre>



<h4>内容二：以在原文后面追加的方式进行输出信息的重定向<br>2.1 以在原文后面追加的方式将所有的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; &amp;&gt;&gt; &lt;file&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt;&gt;&amp; &lt;file&gt;</code></pre>



<h4>2.2 以在原文后面追加的方式只将正确的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt;&gt; &lt;file&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt;&gt; &lt;file&gt;</code></pre>



<h4>2.3 以在原文后面追加的方式只将错误的输出信息重定向到某一个文件</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt;&gt; &lt;file&gt;</code></pre>



<h4>内容三：通过重定向转换输出信息的正误<br>3.1 将错误的输出信息重定向成正确的输出信息</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 2&amp;&gt;1</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt;&amp;1</code></pre>



<h4>3.2 将正确的输出信息重定向成错误的输出信息</h4>



<pre class="wp-block-code"><code>&lt;command&gt; 1&amp;&gt;2</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt;&amp;2</code></pre>



<h4>内容四：将输出信息重定向到黑洞</h4>



<pre class="wp-block-code"><code>&lt;command&gt; &amp;&gt; /dev/null</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &amp;&gt;&gt; /dev/null</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt;&amp; /dev/null</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; &gt;&gt;&amp; /dev/null</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt; /dev/null 2&gt;&amp;1</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt;&gt; /dev/null 2&gt;&amp;1</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt; /dev/null 2&gt;&gt;&amp;1</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 1&gt;&gt; /dev/null 2&gt;&gt;&amp;1</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt; /dev/null 1&gt;&amp;2</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt;&gt; /dev/null 1&gt;&amp;2</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt; /dev/null 1&gt;&gt;&amp;2</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>&lt;command&gt; 2&gt;&gt; /dev/null 1&gt;&gt;&amp;2</code></pre>



<p>（补充：通过此种方法输出信息就既不会显示出来也不会被重定向到一个文件里）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 seq （打印数字序列）</title>
		<link>https://eternalcenter-2021-12.github.io/%e5%91%bd%e4%bb%a4-linux-%e5%91%bd%e4%bb%a4-seq-%ef%bc%88%e6%89%93%e5%8d%b0%e6%95%b0%e5%ad%97%e5%ba%8f%e5%88%97%ef%bc%89/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 04 Oct 2021 09:41:15 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=17786</guid>

					<description><![CDATA[内容目录： 内容一：seq 命令格式 内容二：seq 命令的选项 内容三：seq 命令的使用案例3.1 案例一：seq 打印普通的数字序列3.1.1 打印从 1 到某个数字到数字序列3.1.2 打印从某个数字开始到某个数字结束的数字序列3.1.3 打印从某个数字开始到某个数字结束有数值差距的数字序列3.2 案例二：seq 打印指定前缀的数字序列3.2.1 打印将某个字符串作为前缀的数字序列3.2.2 打印将某个字符串和几个空格作为前缀的数字序列3.2.3 打印将某个字符串和几个字符作为前缀的数字序列3.3 案例三：seq 打印指定间隔符的数字序列3.3.1 打印没有间隔符的数字序列3.3.2 打印间隔符是空格的数字序列3.3.3 打印间隔符是某一个字符的数字序列3.4 案例四：seq 打印指定宽度的数字序列3.5 案例五：seq 使用变量打印数字序列3.6 案例六：将 seq 打印的数字序列导入到一个文件里 具体的内容： 内容一：seq 命令格式 内容二：seq 命令的选项 1) -f 指定序列的格式2) -s 指定序列的间隔符3) -w 使序列宽度相同4) &#8211;equal-width 使序列宽度相同 内容三：seq 命令的使用案例3.1 案例一：seq 打印普通的数字序列3.1.1 打印从 1 到某个数字到数字序列 （补充：这里以打印 1 到 &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/%e5%91%bd%e4%bb%a4-linux-%e5%91%bd%e4%bb%a4-seq-%ef%bc%88%e6%89%93%e5%8d%b0%e6%95%b0%e5%ad%97%e5%ba%8f%e5%88%97%ef%bc%89/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 seq （打印数字序列）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h2>内容目录：</h2>



<h4>内容一：seq 命令格式</h4>



<h4>内容二：seq 命令的选项</h4>



<h4>内容三：seq 命令的使用案例<br>3.1 案例一：seq 打印普通的数字序列<br>3.1.1 打印从 1 到某个数字到数字序列<br>3.1.2 打印从某个数字开始到某个数字结束的数字序列<br>3.1.3 打印从某个数字开始到某个数字结束有数值差距的数字序列<br>3.2 案例二：seq 打印指定前缀的数字序列<br>3.2.1 打印将某个字符串作为前缀的数字序列<br>3.2.2 打印将某个字符串和几个空格作为前缀的数字序列<br>3.2.3 打印将某个字符串和几个字符作为前缀的数字序列<br>3.3 案例三：seq 打印指定间隔符的数字序列<br>3.3.1 打印没有间隔符的数字序列<br>3.3.2 打印间隔符是空格的数字序列<br>3.3.3 打印间隔符是某一个字符的数字序列<br>3.4 案例四：seq 打印指定宽度的数字序列<br>3.5 案例五：seq 使用变量打印数字序列<br>3.6 案例六：将 seq 打印的数字序列导入到一个文件里</h4>



<h2>具体的内容：</h2>



<h4>内容一：seq 命令格式</h4>



<pre class="wp-block-code"><code>1) seq &lt;option> &lt;first number>
2) seq &lt;option> &lt;first number> &lt;last number>
3) seq &lt;option> &lt;first number> &lt;increment> &lt;last number></code></pre>



<h4>内容二：seq 命令的选项</h4>



<p>1) -f 指定序列的格式<br>2) -s 指定序列的间隔符<br>3) -w 使序列宽度相同<br>4) &#8211;equal-width 使序列宽度相同</p>



<h4>内容三：seq 命令的使用案例<br>3.1 案例一：seq 打印普通的数字序列<br>3.1.1 打印从 1 到某个数字到数字序列</h4>



<pre class="wp-block-code"><code># seq 5
1
2
3
4
5</code></pre>



<p>（补充：这里以打印 1 到 5 的数字序列为例）</p>



<h4>3.1.2 打印从某个数字开始到某个数字结束的数字序列</h4>



<pre class="wp-block-code"><code># seq 3 7
3
4
5
6
7</code></pre>



<p>（补充：这里以打印 3 到 7 的数字序列为例）</p>



<h4>3.1.3 打印从某个数字开始到某个数字结束有数值差距的数字序列</h4>



<pre class="wp-block-code"><code># seq 4 2 8
4
6
8</code></pre>



<p>（补充：这里以打印 4 到 8 数值差距为 2 的数字序列为例）</p>



<h4>3.2 案例二：seq 打印指定前缀的数字序列<br>3.2.1 打印将某个字符串作为前缀的数字序列</h4>



<pre class="wp-block-code"><code># seq -f "num%g" 5
num1
num2
num3
num4
num5</code></pre>



<p>（补充：这里以打印 1 到 5 并且将 num 作为前缀的数字序列为例）</p>



<h4>3.2.2 打印将某个字符串和几个空格作为前缀的数字序列</h4>



<pre class="wp-block-code"><code># seq -f "num%3g" 5
num  1
num  2
num  3
num  4
num  5</code></pre>



<p>（补充：这里以打印 1 到 5 并且将 num 和 2 个空格作为前缀的数字序列为例）</p>



<h4>3.2.3 打印将某个字符串和几个字符作为前缀的数字序列</h4>



<pre class="wp-block-code"><code># seq -f "num%03g" 5
num001
num002
num003
num004
num005</code></pre>



<p>（补充：这里以打印 1 到 5 并且将 num 和 2 个 0 作为前缀的数字序列为例）</p>



<h4>3.3 案例三：seq 打印指定间隔符的数字序列<br>3.3.1 打印没有间隔符的数字序列</h4>



<pre class="wp-block-code"><code># seq -s '' 5
12345</code></pre>



<p>（补充：这里以打印 1 到 5 并且没有间隔符的数字序列为例）</p>



<h4>3.3.2 打印间隔符是空格的数字序列</h4>



<pre class="wp-block-code"><code># seq -s ' ' 5
1 2 3 4 5</code></pre>



<p>（补充：这里以打印 1 到 5 并且以空格作为间隔的数字序列为例）</p>



<h4>3.3.3 打印间隔符是某一个字符的数字序列</h4>



<pre class="wp-block-code"><code># seq -s '#' 5
1#2#3#4#5</code></pre>



<p>（补充：这里以打印 1 到 5 并且以 # 作为间隔的数字序列为例）</p>



<h4>3.4 案例四：seq 打印指定宽度的数字序列</h4>



<pre class="wp-block-code"><code># seq -w 1 10
01
02
03
04
05
06
07
08
09
10</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># seq --equal-width 1 10
01
02
03
04
05
06
07
08
09
10</code></pre>



<h4>3.5 案例五：seq 使用变量打印数字序列</h4>



<pre class="wp-block-code"><code># a=5
# seq $a
1
2
3
4
5</code></pre>



<p>（补充：这里以将变量 a 的值设置为 5 ，并且打印 1 到变量 a 的值的数字变量为例）</p>



<h4>3.6 案例六：将 seq 打印的数字序列导入到一个文件里</h4>



<pre class="wp-block-code"><code># seq 1 5 &gt; test.txt
# cat test.txt
1
2
3
4
5</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># seq 1 5 | xargs -I{} echo {} &gt; test.txt

# cat test.txt
1
2
3
4
5</code></pre>



<p>（补充：这里以打印 1 到 5 的数字序列并导入到 test.txt 文件为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 echo （显示字符串）</title>
		<link>https://eternalcenter-2021-12.github.io/echo/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 20 Sep 2021 02:26:02 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=17649</guid>

					<description><![CDATA[内容一：echo 的命令选项 1) -n 输出不换行2) -e 处理某些特殊字符\a 蜂鸣声报警\b 删除前面一个字符\c 在末尾不换行\e 输出 esc\f 换行，同时光标停在原处\n 换行\r 不换行，同时光标停在原处\t tab，水平方向\v tab，垂直方向\ 输出 \\Onnn 输出八进制 ASCII 字符\xHH 输出十六进制 ASCII 字符3) -E 不再转义 内容二：echo 的其他显示选项 1) \033[0m 将所有显示属性关闭2) \033[1m 高亮3) \033[4m 下划线4) \033[5m 闪烁5) \033[7m 反显6) \033[8m 消隐7) \033[37m — \33[0m 设置字体颜色，这里以将字体颜色设置为白色为例8) \033[40m — \33[0m 设置背景颜色，这里以将背景颜色设置为白色为例9) \033[A 将光标向上移 n 行10) \033[B &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/echo/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 echo （显示字符串）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h4>内容一：echo 的命令选项</h4>



<p>1) -n 输出不换行<br>2) -e 处理某些特殊字符<br>\a 蜂鸣声报警<br>\b 删除前面一个字符<br>\c 在末尾不换行<br>\e 输出 esc<br>\f 换行，同时光标停在原处<br>\n 换行<br>\r 不换行，同时光标停在原处<br>\t tab，水平方向<br>\v tab，垂直方向<br>\ 输出 \<br>\Onnn 输出八进制 ASCII 字符<br>\xHH 输出十六进制 ASCII 字符<br>3) -E 不再转义</p>



<h4>内容二：echo 的其他显示选项</h4>



<p>1) \033[0m 将所有显示属性关闭<br>2) \033[1m 高亮<br>3) \033[4m 下划线<br>4) \033[5m 闪烁<br>5) \033[7m 反显<br>6) \033[8m 消隐<br>7) \033[37m — \33[0m 设置字体颜色，这里以将字体颜色设置为白色为例<br>8) \033[40m — \33[0m 设置背景颜色，这里以将背景颜色设置为白色为例<br>9) \033[A 将光标向上移 n 行<br>10) \033[B 将光标向下移 n 行<br>11) \033[C 将光标向右移 n 行<br>12) \033[D 将光标向左移 n 行<br>13) \033[;H 将光标跳转到 x 和 y 位置<br>14) \033[2J 清屏<br>15) \033[K 将光标所在位置到行尾的所有位置全部清除<br>16) \033[s 将光标位置保存<br>17) \033[u 将光标位置恢复<br>18) \033[?25l 将光标隐藏<br>19) \033[?25h 将光标显示</p>



<h4>内容三：echo 显示不同颜色字体的案例</h4>



<pre class="wp-block-code"><code># echo -e "\033&#91;30m black characters \033&#91;0m" 
# echo -e "\033&#91;31m red characters \033&#91;0m"
# echo -e "\033&#91;32m green characters \033&#91;0m" 
# echo -e "\033&#91;33m yellow characters \033&#91;0m"
# echo -e "\033&#91;34m blue characters \033&#91;0m"
# echo -e "\033&#91;35m purple character \033&#91;0m"
# echo -e "\033&#91;36m sky blue character \033&#91;0m"
# echo -e "\033&#91;37m white character \033&#91;0m"</code></pre>



<h4>内容三：echo 显示不同颜色背景的案例</h4>



<pre class="wp-block-code"><code># echo -e "\033&#91;40;37m white characters on black background \033&#91;0m"
# echo -e "\033&#91;41;37m white characters on red background \033&#91;0m"
# echo -e "\033&#91;42;37m white characters on green background \033&#91;0m"
# echo -e "\033&#91;43;37m white characters on yellow background \033&#91;0m"
# echo -e "\033&#91;44;37m white characters on blue background \033&#91;0m"
# echo -e "\033&#91;45;37m white characters on purple background \033&#91;0m"
# echo -e "\033&#91;46;37m white characters on sky blue background \033&#91;0m"
# echo -e "\033&#91;47;30m black characters on white background \033&#91;0m"</code></pre>



<h4>内容四：echo 的其他案例<br>4.1 案例一：不换行带 tab 输出</h4>



<pre class="wp-block-code"><code># for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec;do echo -e "$month\t\c";done
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec</code></pre>



<p>(补充：这里以不换行带 tab 输出 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 为例)</p>



<h4>4.2 案例二：先清屏再不换行输出</h4>



<pre class="wp-block-code"><code># echo -e "\033&#91;2J\033&#91;10A\Eternal Center\c"</code></pre>



<p>（补充：这里以先清屏再不换行输出 Eternal Center 为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 system-analyze （查看服务启动时间）</title>
		<link>https://eternalcenter-2021-12.github.io/system-analyze/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 03 Aug 2021 06:41:33 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=17236</guid>

					<description><![CDATA[内容一：查看所有服务启动的时间 内容二：查看某一个服务启动的时间]]></description>
										<content:encoded><![CDATA[
<h4>内容一：查看所有服务启动的时间</h4>



<pre class="wp-block-code"><code># system-analyze</code></pre>



<h4>内容二：查看某一个服务启动的时间</h4>



<pre class="wp-block-code"><code># system-analyze &lt;service&gt;</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 ifstat （查看网速）</title>
		<link>https://eternalcenter-2021-12.github.io/ifstat/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 15 Jul 2021 02:35:37 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=16732</guid>

					<description><![CDATA[内容一：查看当前一瞬间的网速 内容二：持续查看网速]]></description>
										<content:encoded><![CDATA[
<h4>内容一：查看当前一瞬间的网速</h4>



<pre class="wp-block-code"><code># ifstat</code></pre>



<h4>内容二：持续查看网速</h4>



<pre class="wp-block-code"><code># watch ifstat</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux 生成 UUID 的方法 （Python 版）</title>
		<link>https://eternalcenter-2021-12.github.io/uuid-python/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 26 Jun 2021 14:29:07 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Languages (语言)]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Python Basic (基础)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=16121</guid>

					<description><![CDATA[步骤一：进入 Python 环境 步骤二：导入 UUID 模块 步骤三：生成 UUID 步骤四：生成 UUID 并以十六进制进行显示]]></description>
										<content:encoded><![CDATA[
<h2>步骤一：进入 Python 环境</h2>



<pre class="wp-block-code"><code># python3</code></pre>



<h2>步骤二：导入 UUID 模块</h2>



<pre class="wp-block-code"><code>&gt;&gt;&gt; import uuid</code></pre>



<h2>步骤三：生成 UUID</h2>



<pre class="wp-block-code"><code>&gt;&gt;&gt; uuid.uuid4()</code></pre>



<h2>步骤四：生成 UUID 并以十六进制进行显示</h2>



<pre class="wp-block-code"><code>>>> uuid.uuid4().get_hex()</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 网卡物理 （MAC） 地址的查看</title>
		<link>https://eternalcenter-2021-12.github.io/mac-view/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 27 May 2021 09:18:36 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=14431</guid>

					<description><![CDATA[内容一：查看本服务器的网卡物理（MAC）地址 内容二：查看本地网络的网卡物理（MAC）地址]]></description>
										<content:encoded><![CDATA[
<h4>内容一：查看本服务器的网卡物理（MAC）地址</h4>



<pre class="wp-block-code"><code># ifconfig | grep HW</code></pre>



<h4>内容二：查看本地网络的网卡物理（MAC）地址</h4>



<pre class="wp-block-code"><code># arp -n</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux GRUB 的修复</title>
		<link>https://eternalcenter-2021-12.github.io/grub-repaire/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 18 May 2021 06:51:45 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=14317</guid>

					<description><![CDATA[步骤一：挂载系统光盘进入拯救模式 （步骤略） 步骤二：将相应分区挂载到 /mnt （补充：如果还有其他目录的话也要像这样挂载） （注意：swap 分区不需要挂载） 步骤三：管理关在后的系统环境 步骤四：使用挂载后的系统环境 步骤五：重装 GRUB25.1 生成 /boot/grub2/grub.cfg 5.2 将 GRUB2 安装到对应硬盘 （注意：这里的 &#60;硬盘> 是硬盘例如 /dev/sda，而不是分区或者目录）]]></description>
										<content:encoded><![CDATA[
<h4>步骤一：挂载系统光盘进入拯救模式</h4>



<p>（步骤略）</p>



<h4>步骤二：将相应分区挂载到 /mnt</h4>



<pre class="wp-block-code"><code># mount &lt;系统根分区> /mnt</code></pre>



<p>（补充：如果还有其他目录的话也要像这样挂载）</p>



<p>（注意：swap 分区不需要挂载）</p>



<h4>步骤三：管理关在后的系统环境</h4>



<pre class="wp-block-code"><code># mount --rbind /proc /mnt/proc
# mount --rbind /sys /mnt/sys
# mount --rbind /dev /mnt/dev</code></pre>



<h4>步骤四：使用挂载后的系统环境</h4>



<pre class="wp-block-code"><code># chroot /mnt /bin/bash</code></pre>



<h4>步骤五：重装 GRUB2<br>5.1 生成 /boot/grub2/grub.cfg</h4>



<pre class="wp-block-code"><code># grub2-mkconfig -o /boot/grub2/grub.cfg</code></pre>



<h4>5.2 将 GRUB2 安装到对应硬盘</h4>



<pre class="wp-block-code"><code># grub2-install &lt;disk></code></pre>



<p>（注意：这里的 &lt;硬盘> 是硬盘例如 /dev/sda，而不是分区或者目录）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux su 命令白名单的设置</title>
		<link>https://eternalcenter-2021-12.github.io/su-white-list/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 05 Mar 2021 08:24:01 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=13611</guid>

					<description><![CDATA[步骤一：设置只能属于某一个组的用户才能使用 su 命令1.1 CentOS&#38;RHEL 设置只能属于某一个组的用户才能使用 su 命令 （补充：这里以设置只能 wheel 才能使用 su 命令为例） 1.2 openSUSE&#38;SUSE 设置只能属于某一个组的用户才能使用 su 命令 （补充：这里以设置只能 wheel 才能使用 su 命令为例） 步骤二：将需要使用 su 命令的用户添加到可以使用 su 命令的组 （补充：这里以给 eternalcenter 用户添加 wheel 附属所属组为例） 步骤三：验证 su 命令白名单3.1 以其他普通用户的身份使用 su 命令切换到其他用户 （步骤略） （补充：就算密码正确也会显示 su: Authentication failure） 3.2 以在白名单用户的身份使用 su 命令切换到其他用户]]></description>
										<content:encoded><![CDATA[
<h4>步骤一：设置只能属于某一个组的用户才能使用 su 命令<br>1.1 CentOS&amp;RHEL 设置只能属于某一个组的用户才能使用 su 命令</h4>



<pre class="wp-block-code"><code># sed -i '/auth.*include.*common-auth/a     auth     required       pam_wheel.so use_uid' /etc/pam.d/su</code></pre>



<p>（补充：这里以设置只能 wheel 才能使用 su 命令为例）</p>



<h4>1.2 openSUSE&amp;SUSE 设置只能属于某一个组的用户才能使用 su 命令</h4>



<pre class="wp-block-code"><code># sed -i '/auth.*include.*common-auth/a     auth     required       pam_wheel.so use_uid' /etc/pam.d/su
# sed -i '/auth.*include.*common-auth/a     auth     required       pam_wheel.so use_uid' /etc/pam.d/su-l</code></pre>



<p>（补充：这里以设置只能 wheel 才能使用 su 命令为例）</p>



<h4>步骤二：将需要使用 su 命令的用户添加到可以使用 su 命令的组</h4>



<pre class="wp-block-code"><code># usermod -a -G wheel eternalcenter</code></pre>



<p>（补充：这里以给 eternalcenter 用户添加 wheel 附属所属组为例）</p>



<h4>步骤三：验证 su 命令白名单<br>3.1 以其他普通用户的身份使用 su 命令切换到其他用户</h4>



<p>（步骤略）</p>



<p>（补充：就算密码正确也会显示 su: Authentication failure）</p>



<h4>3.2 以在白名单用户的身份使用 su 命令切换到其他用户</h4>



<pre class="wp-block-code"><code># su - eternalcenter
$ su - root</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux BIOS 和 EFI 的区分 （系统安装时启动分区种类的查看）</title>
		<link>https://eternalcenter-2021-12.github.io/bios-efi/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 08:46:20 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=13591</guid>

					<description><![CDATA[内容一：判断 Linux 是 BIOS 还是 EFI 的方法 （补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS） 内容二：判断 Linux 是 BIOS 还是 EFI 的脚本]]></description>
										<content:encoded><![CDATA[
<h4>内容一：判断 Linux 是 BIOS 还是 EFI 的方法</h4>



<pre class="wp-block-code"><code># ls -ld /sys/firmware/efi</code></pre>



<p>（补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS）</p>



<h4>内容二：判断 Linux 是 BIOS 还是 EFI 的脚本</h4>



<pre class="wp-block-code"><code># &#91; -d /sys/firmware/efi ] &amp;&amp; echo UEFI || echo BIOS</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[实验] Linux ssh 内网穿透</title>
		<link>https://eternalcenter-2021-12.github.io/ssh-intranet-penetration/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Feb 2021 07:25:46 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=13271</guid>

					<description><![CDATA[步骤目录： 步骤一：规划拓扑1.1 服务器列表1.2 拓扑图1.3 服务器列表简介 步骤二：系统环境要求 步骤三：创建用于 ssh 内网穿透的用户3.1 创建用于 ssh 内网穿透的用户3.2 给用于 ssh 内网穿透的用户设置密码 步骤四：创建用于内 ssh 内网穿透的 ssh 密钥4.1 进入到用户4.2 创建用于内 ssh 内网穿透的 ssh 密钥4.3 退出用户 步骤五：让内网服务器可以无密码访问外网服务器5.1 进入到用户5.2 将内网服务器的公钥拷贝到外网服务器5.3 退出用户 步骤六：让外网服务器可以无密码访问自己6.1 进入到用户6.2 将内网服务器的公钥拷贝到外网服务器6.3 退出用户 步骤七：实现内网服务器到外网服务器的 ssh 内网穿透7.1 实现内网服务器到外网服务器的 ssh 通道7.2 实现外网服务器 ssh 端口的影射 步骤八：客户端电脑使用 ssh 外网穿透 具体的操作步骤： 步骤一：规划拓扑1.1 服务器列表 客户端电脑外网服务器内网服务器 1.2 拓扑图 客户端电脑 外网服务器 &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/ssh-intranet-penetration/" class="more-link">Continue reading<span class="screen-reader-text"> "[实验] Linux ssh 内网穿透"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h2>步骤目录：</h2>



<h4>步骤一：规划拓扑<br>1.1 服务器列表<br>1.2 拓扑图<br>1.3 服务器列表简介</h4>



<h4>步骤二：系统环境要求</h4>



<h4>步骤三：创建用于 ssh 内网穿透的用户<br>3.1 创建用于 ssh 内网穿透的用户<br>3.2 给用于 ssh 内网穿透的用户设置密码</h4>



<h4>步骤四：创建用于内 ssh 内网穿透的 ssh 密钥<br>4.1 进入到用户<br>4.2 创建用于内 ssh 内网穿透的 ssh 密钥<br>4.3 退出用户</h4>



<h4>步骤五：让内网服务器可以无密码访问外网服务器<br>5.1 进入到用户<br>5.2 将内网服务器的公钥拷贝到外网服务器<br>5.3 退出用户</h4>



<h4>步骤六：让外网服务器可以无密码访问自己<br>6.1 进入到用户<br>6.2 将内网服务器的公钥拷贝到外网服务器<br>6.3 退出用户</h4>



<h4>步骤七：实现内网服务器到外网服务器的 ssh 内网穿透<br>7.1 实现内网服务器到外网服务器的 ssh 通道<br>7.2 实现外网服务器 ssh 端口的影射</h4>



<h4>步骤八：客户端电脑使用 ssh 外网穿透</h4>



<h2>具体的操作步骤：</h2>



<h4>步骤一：规划拓扑<br>1.1 服务器列表</h4>



<p>客户端电脑<br>外网服务器<br>内网服务器</p>



<h4>1.2 拓扑图</h4>



<p>客户端电脑 外网服务器 内网服务器</p>



<h4>1.3 拓扑图简介</h4>



<p>内网服务器建立到外网服务器的 ssh 通道<br>客户端电脑通过 ssh 外网服务器连接到内网服务器<br>内网服务器就算没有公网 IP 地址也能被 ssh 上</p>



<h4>步骤二：系统环境要求</h4>



<p>1) 所有服务器的系统都需要是 Linux 版本<br>2) 所有服务器都要关闭防火墙<br>3) 内网服务器要能够 ping 通外网服务器<br>4) 客户端电脑要能够 ping 通外网服务器</p>



<h4>步骤三：创建用于 ssh 内网穿透的用户<br>3.1 创建用于 ssh 内网穿透的用户</h4>



<p>（分别在内网服务器和外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code># useradd &lt;user for intranet penetration&gt;</code></pre>



<h4>3.2 给用于 ssh 内网穿透的用户设置密码</h4>



<p>（分别在内网服务器和外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code># passwd &lt;user for intranet penetration&gt;</code></pre>



<h4>步骤四：创建用于内 ssh 内网穿透的 ssh 密钥<br>4.1 进入到用户</h4>



<p>（分别在内网服务器和外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code># su - &lt;user for intranet penetration&gt;</code></pre>



<h4>4.2 创建用于内 ssh 内网穿透的 ssh 密钥</h4>



<p>（分别在内网服务器和外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ ssh-keygen</code></pre>



<h4>4.3 退出用户</h4>



<p>（分别在内网服务器和外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ exit</code></pre>



<h4>步骤五：让内网服务器可以无密码访问外网服务器<br>5.1 进入到用户</h4>



<p>（只在内网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code># su - &lt;user for intranet penetration&gt;</code></pre>



<h4>5.2 将内网服务器的公钥拷贝到外网服务器</h4>



<p>（只在内网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ ssh-copy-id &lt;IP address of Internet server&gt;</code></pre>



<h4>5.3 退出用户</h4>



<p>（只在内网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ exit</code></pre>



<h4>步骤六：让外网服务器可以无密码访问自己<br>6.1 进入到用户</h4>



<p>（只在外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code># su - &lt;user for intranet penetration&gt;</code></pre>



<h4>6.2 将内网服务器的公钥拷贝到外网服务器</h4>



<p>（只在外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ ssh-copy-id &lt;127.0.0.1&gt;</code></pre>



<h4>6.3 退出用户</h4>



<p>（只在外网服务器上执行以下步骤）</p>



<pre class="wp-block-code"><code>$ exit</code></pre>



<h4>步骤七：实现内网服务器到外网服务器的 ssh 内网穿透<br>7.1 实现内网服务器到外网服务器的 ssh 通道</h4>



<pre class="wp-block-code"><code># su - &lt;user for intranet penetration&gt;
$ ssh -X -fCNR 11000:localhost:22 &lt;IP address of Internet server&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># ps -aux | grep -v grep | grep "11000:localhost:22 &lt;IP address of Internet server&gt;" &amp;&gt; /dev/null || su - &lt;user for intranet penetration&gt; -c 'ssh -X -fCNR 11000:localhost:22 &lt;IP address of Internet server&gt;'</code></pre>



<p>（补充：这里以使用用于内网穿透的用户将内网服务器的 22 端口影射到外网服务器的 11000 端口为例）</p>



<h4>7.2 实现外网服务器 ssh 端口的影射</h4>



<pre class="wp-block-code"><code># su - &lt;user for intranet penetration&gt;
$ ssh -X -fCNL *:10000:localhost:11000 localhost</code></pre>



<p>或者:</p>



<pre class="wp-block-code"><code># ps -aux | grep -v grep | grep "*:10000:localhost:11000 localhost" || su - &lt;user for intranet penetration&gt; -c 'ssh -X -fCNL *:10000:localhost:11000 localhost'</code></pre>



<p>（补充：这里以使用用于内网穿透的用户将外网服务器的 10000 端口影射到外网服务器的 11000 端口为例）</p>



<h4>步骤八：客户端电脑使用 ssh 外网穿透</h4>



<pre class="wp-block-code"><code># ssh -p 10000 &lt;user for intranet penetration&gt;@&lt;IP address of Internet server&gt;</code></pre>



<p>（补充：ssh 成功后，客户端电脑就可以直接 ssh 到内网服务器中了）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 convert （转换图片文件）</title>
		<link>https://eternalcenter-2021-12.github.io/convert/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 15 Jan 2021 07:40:28 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=13220</guid>

					<description><![CDATA[内容一：convert 命令的使用格式 内容二：convert 命令的使用案例2.1 案例一：直接转换某一个文件 （补充：这里以将 a.png 转换成 a.png.jpg 为例） 2.2 案例二：转换当前目录下的所有文件 （补充：这里以将当前目录下的所有 *.png 文件转换成 *.png.jpg 文件）]]></description>
										<content:encoded><![CDATA[
<h4>内容一：convert 命令的使用格式</h4>



<pre class="wp-block-code"><code># convert &lt;input options> &lt;output file name> &lt;output options> &lt;output file name></code></pre>



<h4>内容二：convert 命令的使用案例<br>2.1 案例一：直接转换某一个文件</h4>



<pre class="wp-block-code"><code># convert "a.png" "a.png.jpg"</code></pre>



<p>（补充：这里以将 a.png 转换成 a.png.jpg 为例）</p>



<h4>2.2 案例二：转换当前目录下的所有文件</h4>



<pre class="wp-block-code"><code># ls -1 *.png | xargs -n 1 bash -c 'convert "$0" "${0%.png}.jpg"'</code></pre>



<p>（补充：这里以将当前目录下的所有 *.png 文件转换成 *.png.jpg 文件）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 sshpass （密码非交互式 ssh） （转载）</title>
		<link>https://eternalcenter-2021-12.github.io/sshpass/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 15 Jan 2021 06:55:05 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System User (系统用户)]]></category>
		<category><![CDATA[System User & System Privilege (系统用户 & 系统权限)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=13214</guid>

					<description><![CDATA[注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code>sshpass的安装使用
 
1：sshpass下载与安装
     yum安装：

    yum install sshpass

     若yum安装不上，则用下面方法

        https:&#47;&#47;sourceforge.net/projects/sshpass/files/
          or
        https://pan.baidu.com/s/1pLNxeLd
         or
        wget http://sourceforge.net/projects/sshpass/files/latest/download -O sshpass.tar.gz



 
2：下载后，解压，安装

      

        tar -zxvf sshpass-1.06.tar.gz
        cd sshpass-1.06
        ./configure
        make
        make install


3：使用命令

         

    sshpass -p 123456 scp /home/file.txt root@10.0.0.37:/home/copy



      后面这个是 “Are you sure you want to continue connecting (yes/no)”使得这个自动接受，若不加，则成功不了
 
4：脚本

    复制代码

          #!/bin/bash
            password=123456
            user=root
            ip=10.0.0.37
            file=/home/file.txt
           sshpass -p $password scp file $user@$ip:/home/copy/


————————————————
版权声明：本文为CSDN博主「totoroKing」的原创文章，遵循 CC 4.0 BY-SA 版权协议，转载请附上原文出处链接及本声明。
原文链接：https://blog.csdn.net/qq_30553235/article/details/78711491</code></pre>



<p>注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1012" height="209" src="https://eternalcenter-2021-12.github.io/wp-content/uploads/2021/01/版权申明证明-sshpass.png" alt="" class="wp-image-13216" srcset="https://eternalcenter-2021-12.github.io/wp-content/uploads/2021/01/版权申明证明-sshpass.png 1012w, https://eternalcenter-2021-12.github.io/wp-content/uploads/2021/01/版权申明证明-sshpass-300x62.png 300w, https://eternalcenter-2021-12.github.io/wp-content/uploads/2021/01/版权申明证明-sshpass-768x159.png 768w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /><figcaption><em>CC 4.0 BY-SA 版权协议网址：https://creativecommons.org/licenses/by-sa/4.0/deed.z</em></figcaption></figure></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 退出状态代码 （转载）</title>
		<link>https://eternalcenter-2021-12.github.io/exit/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 27 Nov 2020 13:30:16 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Languages (语言)]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Basic (基础)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=11788</guid>

					<description><![CDATA[注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code>Linux Shell学习笔记：exit退出状态代码

inux提供$?特殊变量来保存最后一条命令执行结束的退出状态。执行完一条命令后，立即执行echo$?，可以查看最后一条命令的退出状态值。

正常的情况下，命令成功执行完成的退出状态是0，如果非0，则命令执行有错。

该命令可以用于检查命令是否正确执行，比如在解压包的时候，检查解压包是否成功十分有效。

 

自定义退出状态码，可以在脚本中定义自己的退出状态代码，然后使用echo $?检查。

退出状态码最高是255，一般自定义的代码值为0~255，如果超出255，则返回该数值被256除了之后的余数。

 

 

退出状态代码：

0 命令成功完成

1通常的未知错误

2误用shell命令

126命令无法执行

127没有找到命令

128无效的退出参数

128+x使用Linux信号x的致命错误。

130使用Ctrl-C终止的命令

255规范外的退出状态

ubuntu下测试结果如下

    wl@wl-MS-7673:/home/python$ date
     
    2013年 11月 14日 星期四 19:12:45 CST
     
    wl@wl-MS-7673:/home/python$ echo $?
     
    0
     
    wl@wl-MS-7673:/home/python$ kkllk
     
    kkllk: command not found
     
    wl@wl-MS-7673:/home/python$ echo $?
     
    127
     
    wl@wl-MS-7673:/home/python$ ls
     
    hello.py hello.py~
     
    wl@wl-MS-7673:/home/python$ vim a.c
     
    wl@wl-MS-7673:/home/python$ ls
     
    hello.py hello.py~
     
    wl@wl-MS-7673:/home/python$ gedit a.c
     
    wl@wl-MS-7673:/home/python$ ./hello.py
     
    bash: ./hello.py: 权限不够
     
    wl@wl-MS-7673:/home/python$ echo $?
     
    126
     
    wl@wl-MS-7673:/home/python$ date %t
     
    date: 无效的日期"%t"
     
    wl@wl-MS-7673:/home/python$ echo $?
     
    1
     
    wl@wl-MS-7673:/home/python$


 

    root@wl-MS-7673:~# ls -sail test
     
    790207 4 -rwxr--r-- 1 root root 30 11月 14 19:25 test
     
    root@wl-MS-7673:~# ./test
     
    root@wl-MS-7673:~# echo $?
     
    44
     
    root@wl-MS-7673:~# cat test
     
    #!/bin/bash
     
    var=300
     
    exit $var
     
    root@wl-MS-7673:~#

————————————————
版权声明：本文为CSDN博主「ChasingdreamLY」的原创文章，遵循 CC 4.0 BY-SA 版权协议，转载请附上原文出处链接及本声明。
原文链接：https://blog.csdn.net/qq_26591517/article/details/82492829</code></pre>



<p>注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="1009" height="190" src="https://eternalcenter-2021-12.github.io/wp-content/uploads/2020/11/版权申明证明-退出状态代码.png" alt="" class="wp-image-11838" srcset="https://eternalcenter-2021-12.github.io/wp-content/uploads/2020/11/版权申明证明-退出状态代码.png 1009w, https://eternalcenter-2021-12.github.io/wp-content/uploads/2020/11/版权申明证明-退出状态代码-300x56.png 300w, https://eternalcenter-2021-12.github.io/wp-content/uploads/2020/11/版权申明证明-退出状态代码-768x145.png 768w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /><figcaption>CC 4.0 BY-SA 版权协议网址：https://creativecommons.org/licenses/by-sa/4.0/deed.z</figcaption></figure></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Gnome 前台命令的执行</title>
		<link>https://eternalcenter-2021-12.github.io/front/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 22 Nov 2020 15:49:19 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=11797</guid>

					<description><![CDATA[内容一：直接执行前台命令1.1 设置显示变量 1.2 执行前台命令 （补充：这里以在前台执行 ls 命令为例） 内容二：周期执行前台命令 添加以下内容： （补充：这里以每分钟在前台执行 ls 命令为例）]]></description>
										<content:encoded><![CDATA[
<h4>内容一：直接执行前台命令<br>1.1 设置显示变量</h4>



<pre class="wp-block-code"><code># export DISPLAY=":0"</code></pre>



<h4>1.2 执行前台命令</h4>



<pre class="wp-block-code"><code># gnome-terminal -x bash -c "ls; exec bash"</code></pre>



<p>（补充：这里以在前台执行 ls 命令为例）</p>



<h4>内容二：周期执行前台命令</h4>



<pre class="wp-block-code"><code># crontab -e</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
*/1 * * * * export DISPLAY=":0" &amp;&amp; gnome-terminal -x bash -c "&lt;命令>; exec bash"</code></pre>



<p>（补充：这里以每分钟在前台执行 ls 命令为例）</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
