<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN"><id>https://echotint.com/</id><title>EchoTint · 文章</title><subtitle>技术笔记和日常记录。</subtitle><link href="https://echotint.com/"/><link href="https://echotint.com/atom.xml" rel="self"/><updated>2026-04-02T02:00:00.000Z</updated><author><name>Edwin</name></author><entry><id>https://echotint.com/2026/04/02/linux-basics/</id><title>Linux 基础入门：版本与重要概念</title><link href="https://echotint.com/2026/04/02/linux-basics/"/><published>2026-04-02T02:00:00.000Z</published><updated>2026-04-02T02:00:00.000Z</updated><summary>从 Linux 内核版本、常见发行版，到文件系统、权限、进程等核心概念，快速建立 Linux 基础认知。</summary><content type="html">&lt;h1 id=&quot;Linux-基础入门：版本与重要概念&quot; aria-hidden=&quot;true&quot;&gt;Linux 基础入门：版本与重要概念&lt;/h1&gt;
&lt;p&gt;Linux 并不是一个单独的软件包，而是一个以 Linux 内核为核心、围绕工具链、包管理器、服务管理和桌面环境构建出来的操作系统生态。对于初学者来说，先理解 Linux 的版本划分，再掌握几个关键概念，会更容易建立整体认知。&lt;/p&gt;
&lt;h2 id=&quot;Linux-版本&quot;&gt;Linux 版本&lt;/h2&gt;
&lt;p&gt;提到 Linux 版本时，通常可以分成两个层面来看：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;内核版本&lt;/li&gt;
&lt;li&gt;常见发行版本&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;内核版本&quot;&gt;内核版本&lt;/h3&gt;
&lt;p&gt;Linux 内核是操作系统最核心的部分，负责硬件管理、进程调度、内存管理、文件系统支持、设备驱动等工作。&lt;/p&gt;
&lt;p&gt;内核版本通常采用类似下面的格式：&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;/_astro/ec.ap99l.css&quot;&gt;&lt;script type=&quot;module&quot; src=&quot;/_astro/ec.0vx5m.js&quot;&gt;&lt;/script&gt;&lt;figure class=&quot;frame has-title&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;纯文本&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#24292e;--1:#e1e4e8&quot;&gt;6.6.21&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;复制代码&quot; data-copied=&quot;已复制&quot; data-code=&quot;6.6.21&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;一般可以这样理解：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;第一位表示主版本号&lt;/li&gt;
&lt;li&gt;第二位表示功能演进中的大版本&lt;/li&gt;
&lt;li&gt;第三位表示修复补丁版本&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;内核版本关注的是底层能力，例如：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;是否支持新的硬件&lt;/li&gt;
&lt;li&gt;调度器和内存管理是否优化&lt;/li&gt;
&lt;li&gt;某些文件系统和驱动是否得到增强&lt;/li&gt;
&lt;li&gt;安全漏洞是否已修复&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;在企业场景中，经常会接触到两类内核：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;稳定内核：更注重兼容性和稳定性，适合服务器环境&lt;/li&gt;
&lt;li&gt;长期支持内核（LTS）：维护周期更长，适合生产环境长期使用&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;也就是说，内核版本决定了 Linux 底层“能做什么”和“做得是否稳定”。&lt;/p&gt;
&lt;h3 id=&quot;常见发行版本&quot;&gt;常见发行版本&lt;/h3&gt;
&lt;p&gt;只有内核还不够，用户还需要命令工具、软件包管理器、安装程序、服务管理工具和默认配置。这些组合在一起，就形成了不同的 Linux 发行版。&lt;/p&gt;
&lt;p&gt;常见发行版包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ubuntu：对新手友好，社区活跃，桌面和服务器都很常见&lt;/li&gt;
&lt;li&gt;Debian：稳定性高，很多发行版都基于它演进&lt;/li&gt;
&lt;li&gt;CentOS：过去在服务器场景非常常见&lt;/li&gt;
&lt;li&gt;Rocky Linux：CentOS 之后较常见的企业替代选择之一&lt;/li&gt;
&lt;li&gt;AlmaLinux：同样是面向企业兼容场景的常见选择&lt;/li&gt;
&lt;li&gt;Fedora：版本较新，适合体验新特性&lt;/li&gt;
&lt;li&gt;Red Hat Enterprise Linux（RHEL）：企业级商业发行版&lt;/li&gt;
&lt;li&gt;Arch Linux：更强调自定义和滚动更新，适合有一定基础的用户&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这些发行版的主要差异通常体现在：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;软件包管理方式不同，例如 &lt;code&gt;apt&lt;/code&gt;、&lt;code&gt;dnf&lt;/code&gt;、&lt;code&gt;yum&lt;/code&gt;、&lt;code&gt;pacman&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;默认目录和配置习惯有差异&lt;/li&gt;
&lt;li&gt;软件版本的新旧程度不同&lt;/li&gt;
&lt;li&gt;稳定性和更新策略不同&lt;/li&gt;
&lt;li&gt;社区支持或商业支持不同&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;可以把它们理解为：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Linux 内核像“发动机”&lt;/li&gt;
&lt;li&gt;发行版像“整车方案”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;不同发行版可能使用相近的内核，但给用户提供的使用体验和运维方式会明显不同。&lt;/p&gt;
&lt;h2 id=&quot;Linux-重要概念&quot;&gt;Linux 重要概念&lt;/h2&gt;
&lt;p&gt;理解 Linux 时，下面这些概念最重要。&lt;/p&gt;
&lt;h3 id=&quot;1-一切皆文件&quot;&gt;1. 一切皆文件&lt;/h3&gt;
&lt;p&gt;Linux 中很多资源都可以通过文件形式进行访问和操作，例如：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;普通文本文件&lt;/li&gt;
&lt;li&gt;目录&lt;/li&gt;
&lt;li&gt;设备文件&lt;/li&gt;
&lt;li&gt;管道&lt;/li&gt;
&lt;li&gt;套接字&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这意味着 Linux 倾向于用统一的方式来处理各种资源，学习成本会更低，脚本化也更方便。&lt;/p&gt;
&lt;h3 id=&quot;2-目录结构&quot;&gt;2. 目录结构&lt;/h3&gt;
&lt;p&gt;Linux 使用树形目录结构，所有内容都从根目录 &lt;code&gt;/&lt;/code&gt; 开始。&lt;/p&gt;
&lt;p&gt;常见目录含义如下：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/home&lt;/code&gt;：普通用户的家目录&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/root&lt;/code&gt;：超级管理员 root 的家目录&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/etc&lt;/code&gt;：系统配置文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/bin&lt;/code&gt;：基础命令&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr&lt;/code&gt;：用户层程序和共享资源&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/var&lt;/code&gt;：日志、缓存等经常变化的数据&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/tmp&lt;/code&gt;：临时文件&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;学习 Linux 时，不仅要会执行命令，也要逐步熟悉目录分工。&lt;/p&gt;
&lt;h3 id=&quot;3-用户与权限&quot;&gt;3. 用户与权限&lt;/h3&gt;
&lt;p&gt;Linux 是一个多用户操作系统，不同用户拥有不同的访问权限。&lt;/p&gt;
&lt;p&gt;常见权限对象有三类：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt;：文件所有者&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g&lt;/code&gt;：所属用户组&lt;/li&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt;：其他用户&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;常见权限类型有三种：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;r&lt;/code&gt;：读&lt;/li&gt;
&lt;li&gt;&lt;code&gt;w&lt;/code&gt;：写&lt;/li&gt;
&lt;li&gt;&lt;code&gt;x&lt;/code&gt;：执行&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;例如：&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame has-title&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;Bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;chmod&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;755&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;demo.sh&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;复制代码&quot; data-copied=&quot;已复制&quot; data-code=&quot;chmod 755 demo.sh&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;表示：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;所有者可读、可写、可执行&lt;/li&gt;
&lt;li&gt;同组用户可读、可执行&lt;/li&gt;
&lt;li&gt;其他用户可读、可执行&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;权限机制是 Linux 安全模型的基础。&lt;/p&gt;
&lt;h3 id=&quot;4-进程&quot;&gt;4. 进程&lt;/h3&gt;
&lt;p&gt;程序运行起来之后，就变成了进程。Linux 会为每个进程分配进程号（PID），并由内核统一调度。&lt;/p&gt;
&lt;p&gt;常见相关理解包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;一个程序可以启动多个进程&lt;/li&gt;
&lt;li&gt;进程有前台和后台之分&lt;/li&gt;
&lt;li&gt;进程之间会竞争 CPU 和内存资源&lt;/li&gt;
&lt;li&gt;服务程序本质上也是持续运行的进程&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;日常经常会用到的命令有：&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame has-title&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;Bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;ps&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;top&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#005CC5;--1:#79B8FF&quot;&gt;kill&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;复制代码&quot; data-copied=&quot;已复制&quot; data-code=&quot;pstopkill&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;5-Shell&quot;&gt;5. Shell&lt;/h3&gt;
&lt;p&gt;Shell 是用户和操作系统之间的命令解释器，常见的有：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bash&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;zsh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sh&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;用户在终端输入命令后，Shell 负责解析命令并交给系统执行。很多自动化运维工作，实际上就是通过 Shell 脚本完成的。&lt;/p&gt;
&lt;h3 id=&quot;6-软件包管理&quot;&gt;6. 软件包管理&lt;/h3&gt;
&lt;p&gt;Linux 安装软件通常不是直接双击安装包，而是通过包管理器完成。&lt;/p&gt;
&lt;p&gt;常见工具有：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;apt&lt;/code&gt;：Debian、Ubuntu 常用&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yum&lt;/code&gt; / &lt;code&gt;dnf&lt;/code&gt;：RHEL、CentOS、Rocky Linux、AlmaLinux 常用&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pacman&lt;/code&gt;：Arch Linux 常用&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;包管理器可以帮助我们：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;安装软件&lt;/li&gt;
&lt;li&gt;升级软件&lt;/li&gt;
&lt;li&gt;卸载软件&lt;/li&gt;
&lt;li&gt;自动处理依赖关系&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;7-服务与守护进程&quot;&gt;7. 服务与守护进程&lt;/h3&gt;
&lt;p&gt;Linux 中很多功能是通过后台服务提供的，例如：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Web 服务&lt;/li&gt;
&lt;li&gt;数据库服务&lt;/li&gt;
&lt;li&gt;SSH 服务&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;这类长期运行在后台的程序通常称为守护进程。现代 Linux 发行版中，很多服务通过 &lt;code&gt;systemd&lt;/code&gt; 管理，常见命令包括：&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame has-title&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;Bash&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;start&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;nginx&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;stop&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;nginx&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;gutter&quot;&gt;&lt;div class=&quot;ln&quot; aria-hidden=&quot;true&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#6F42C1;--1:#B392F0&quot;&gt;systemctl&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;--0:#24292E;--1:#E1E4E8&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#032F62;--1:#9ECBFF&quot;&gt;nginx&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;copy&quot;&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;button title=&quot;复制代码&quot; data-copied=&quot;已复制&quot; data-code=&quot;systemctl start nginxsystemctl stop nginxsystemctl status nginx&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h3 id=&quot;8-文件系统&quot;&gt;8. 文件系统&lt;/h3&gt;
&lt;p&gt;文件系统决定了数据如何被组织和存储。常见文件系统有：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ext4&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xfs&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;btrfs&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;不同文件系统在性能、可靠性、快照能力和扩展能力上会有差异。对开发者来说，先知道“磁盘不是直接裸用的，而是通过文件系统组织数据”就足够了。&lt;/p&gt;
&lt;h2 id=&quot;总结&quot;&gt;总结&lt;/h2&gt;
&lt;p&gt;学习 Linux，可以先抓住两条主线：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;版本层面：分清内核版本和发行版&lt;/li&gt;
&lt;li&gt;使用层面：理解目录、权限、进程、Shell、包管理和服务&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;如果把 Linux 比作一套完整系统，那么：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;内核决定底层能力&lt;/li&gt;
&lt;li&gt;发行版决定使用方式&lt;/li&gt;
&lt;li&gt;权限、进程、文件系统等概念决定你能否真正用好它&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;对于入门阶段，不需要一开始就记住所有命令，先建立正确的整体框架更重要。后续再继续学习常用命令、用户管理、网络配置和服务部署，会轻松很多。&lt;/p&gt;</content><category term="Linux"/><category term="Operating System"/></entry></feed>