import{_ as i,c as a,a as e,o as n}from"./app-I9WJttm3.js";const l={};function h(d,s){return n(),a("div",null,[...s[0]||(s[0]=[e(`<p>Hello～ 欢迎来到 Linux 命令的奇妙世界！今天，爱莉希雅将带着祀梦一起探索那些最常用、最实用的 Linux 基础命令哦～ 准备好了吗？Let&#39;s go！🚀</p><h2 id="文件与目录操作" tabindex="-1"><a class="header-anchor" href="#文件与目录操作"><span>文件与目录操作</span></a></h2><h3 id="ls-查看目录内容" tabindex="-1"><a class="header-anchor" href="#ls-查看目录内容"><span>ls - 查看目录内容</span></a></h3><p><code>ls</code> 命令就像是你的眼睛，可以帮你查看当前目录下有哪些文件和文件夹～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看当前目录内容</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ls</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看详细信息（包括权限、大小、修改时间等）</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ls</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -l</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 显示所有文件（包括隐藏文件）</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ls</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -a</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 以人类可读的方式显示文件大小</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ls</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -lh</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="cd-切换目录" tabindex="-1"><a class="header-anchor" href="#cd-切换目录"><span>cd - 切换目录</span></a></h3><p><code>cd</code> 命令是你的小脚丫，可以带你在不同的目录之间穿梭～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 进入指定目录</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">cd</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /path/to/directory</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 回到上一级目录</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">cd</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> ..</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 回到主目录</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">cd</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> ~</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 回到上一次所在的目录</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">cd</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> -</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="pwd-显示当前路径" tabindex="-1"><a class="header-anchor" href="#pwd-显示当前路径"><span>pwd - 显示当前路径</span></a></h3><p>有时候我们可能会迷路，这时候 <code>pwd</code> 命令就像是指南针，可以告诉我们当前所在的位置～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 显示当前工作目录的绝对路径</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">pwd</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="mkdir-创建目录" tabindex="-1"><a class="header-anchor" href="#mkdir-创建目录"><span>mkdir - 创建目录</span></a></h3><p>想要创建新的文件夹？<code>mkdir</code> 命令可以帮你实现这个愿望～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 创建一个新目录</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">mkdir</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> new_directory</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 递归创建多级目录</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">mkdir</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -p</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> parent/child/grandchild</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="rm-删除文件或目录" tabindex="-1"><a class="header-anchor" href="#rm-删除文件或目录"><span>rm - 删除文件或目录</span></a></h3><p><code>rm</code> 命令可以帮你清理不需要的文件和目录，但要小心使用哦，删除后可是很难恢复的～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 删除文件</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">rm</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 强制删除文件（不提示）</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">rm</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -f</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 删除目录</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">rm</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -r</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> directory</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 强制删除目录（不提示）</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">rm</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -rf</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> directory</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="文件内容查看" tabindex="-1"><a class="header-anchor" href="#文件内容查看"><span>文件内容查看</span></a></h2><h3 id="cat-查看文件全部内容" tabindex="-1"><a class="header-anchor" href="#cat-查看文件全部内容"><span>cat - 查看文件全部内容</span></a></h3><p><code>cat</code> 命令就像是一个快速阅读器，可以帮你一次性查看整个文件的内容～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看文件内容</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">cat</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 显示行号</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">cat</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -n</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="less-分页查看长文件" tabindex="-1"><a class="header-anchor" href="#less-分页查看长文件"><span>less - 分页查看长文件</span></a></h3><p>如果文件太长，一次性看不完怎么办？<code>less</code> 命令可以帮你分页查看～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 分页查看文件内容</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">less</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 在 less 模式下，可以使用方向键上下滚动，按 q 退出</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="head-和-tail-查看文件开头和结尾" tabindex="-1"><a class="header-anchor" href="#head-和-tail-查看文件开头和结尾"><span>head 和 tail - 查看文件开头和结尾</span></a></h3><p>只想看文件的开头或结尾部分？<code>head</code> 和 <code>tail</code> 命令可以满足你的需求～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看文件前 10 行</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">head</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看文件前 20 行</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">head</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -20</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看文件最后 10 行</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">tail</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 实时查看文件更新（常用于查看日志）</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">tail</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -f</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.log</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="文本搜索" tabindex="-1"><a class="header-anchor" href="#文本搜索"><span>文本搜索</span></a></h2><h3 id="grep-搜索文本内容" tabindex="-1"><a class="header-anchor" href="#grep-搜索文本内容"><span>grep - 搜索文本内容</span></a></h3><p><code>grep</code> 命令就像是一个侦探，可以帮你在文件中搜索特定的文本～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 在文件中搜索特定文本</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">grep</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;"> &quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">search_text</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;">&quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 忽略大小写搜索</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">grep</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -i</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;"> &quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">search_text</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;">&quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 显示匹配行及前后几行</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">grep</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -A</span><span style="--shiki-light:#2F798A;--shiki-dark:#4C9A91;"> 5</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -B</span><span style="--shiki-light:#2F798A;--shiki-dark:#4C9A91;"> 5</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;"> &quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">search_text</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;">&quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> filename.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 递归搜索目录下所有文件</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">grep</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -r</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;"> &quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">search_text</span><span style="--shiki-light:#B5695977;--shiki-dark:#C98A7D77;">&quot;</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> directory/</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="系统信息查看" tabindex="-1"><a class="header-anchor" href="#系统信息查看"><span>系统信息查看</span></a></h2><h3 id="uname-查看系统信息" tabindex="-1"><a class="header-anchor" href="#uname-查看系统信息"><span>uname - 查看系统信息</span></a></h3><p>想要了解你的 Linux 系统是什么版本？<code>uname</code> 命令可以告诉你～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看系统内核信息</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">uname</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -a</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="top-查看进程信息" tabindex="-1"><a class="header-anchor" href="#top-查看进程信息"><span>top - 查看进程信息</span></a></h3><p><code>top</code> 命令就像是系统的仪表盘，可以实时显示系统的运行状态和进程信息～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看系统进程信息</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">top</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 在 top 模式下，可以按 q 退出</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="网络命令" tabindex="-1"><a class="header-anchor" href="#网络命令"><span>网络命令</span></a></h2><h3 id="ping-测试网络连接" tabindex="-1"><a class="header-anchor" href="#ping-测试网络连接"><span>ping - 测试网络连接</span></a></h3><p>想知道你的电脑能不能连接到某个网站？<code>ping</code> 命令可以帮你测试～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 测试网络连接</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ping</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> www.example.com</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="ifconfig-ip-查看网络接口信息" tabindex="-1"><a class="header-anchor" href="#ifconfig-ip-查看网络接口信息"><span>ifconfig/ip - 查看网络接口信息</span></a></h3><p>想了解你的网络配置？<code>ifconfig</code> 或 <code>ip</code> 命令可以帮你查看～</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 查看网络接口信息</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ifconfig</span></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;"># 或者</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">ip</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> addr</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="小练习" tabindex="-1"><a class="header-anchor" href="#小练习"><span>小练习</span></a></h2><p>现在，让我们来做一个小练习吧！尝试使用今天学到的命令完成以下任务：</p><ol><li>在家目录下创建一个名为 <code>practice</code> 的文件夹</li><li>进入 <code>practice</code> 文件夹，创建一个名为 <code>notes.txt</code> 的文件</li><li>使用 <code>cat</code> 命令查看该文件（虽然现在它是空的）</li><li>返回上一级目录，然后使用 <code>ls -la</code> 查看所有文件和目录的详细信息</li></ol><p>怎么样？你都完成了吗？如果遇到了问题，不要着急，多试几次就会熟悉啦～ 😊</p><h2 id="小结" tabindex="-1"><a class="header-anchor" href="#小结"><span>小结</span></a></h2><p>今天我们学习了很多实用的 Linux 基础命令，这些命令就像是 Linux 世界的积木，只要你熟练掌握它们，就可以搭建出各种各样的奇妙作品～ 记得要多多练习哦，实践出真知嘛！</p><p>下次我们将学习更多高级的 Linux 命令和技巧，敬请期待～ 拜拜～ 👋</p>`,52)])])}const t=i(l,[["render",h]]),r=JSON.parse('{"path":"/ops/linux/basic-commands/","title":"Linux 基础命令详解","lang":"zh-CN","frontmatter":{"title":"Linux 基础命令详解","createTime":"2025/09/28 10:45:00","permalink":"/ops/linux/basic-commands/"},"readingTime":{"minutes":3.87,"words":1160},"git":{"createdTime":1759061001000,"updatedTime":1759061001000,"contributors":[{"name":"si-meng-spec","username":"si-meng-spec","email":"simeng@simengweb.com","commits":1,"avatar":"https://avatars.githubusercontent.com/si-meng-spec?v=4","url":"https://github.com/si-meng-spec"}]},"filePathRelative":"notes/ops/linux/basic-commands.md","headers":[]}');export{t as comp,r as data};
