<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on kj’s blog</title><link>https://kfjie.me/en/tags/linux/</link><description>Recent content from kj’s blog</description><generator>Hugo</generator><language>en</language><managingEditor>None (Kfjie)</managingEditor><webMaster>None (Kfjie)</webMaster><copyright>All articles on this blog are licensed under the BY-NC-SA license agreement unless otherwise stated. Please indicate the source when reprinting!</copyright><lastBuildDate>Sat, 07 Feb 2026 21:18:00 +0800</lastBuildDate><atom:link href="https://kfjie.me/en/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>A Detailed Explanation of the Linux Server Directory Structure</title><link>https://kfjie.me/en/post/understanding-the-server/</link><pubDate>Sat, 07 Feb 2026 21:18:00 +0800</pubDate><author>None (Kfjie)</author><guid>https://kfjie.me/en/post/understanding-the-server/</guid><description>
<![CDATA[<h1>A Detailed Explanation of the Linux Server Directory Structure</h1><p>Author: Kfjie(None)</p>
        
          <p>The Linux file system uses a tree-like structure, and all files and directories start at <strong>Root Directory</strong> (<code>/</code>)。</p>
<h2 id="diagram-of-the-linux-file-system-structure">
<a class="header-anchor" href="#diagram-of-the-linux-file-system-structure"></a>
Diagram of the Linux File System Structure
</h2><pre class="mermaid">
  graph LR
    Root["/ (根目录)"]

    subgraph sg_core [核心系统]
        Usr["/usr/"]
        Boot["/boot/"]
        LinkBin["/bin, /sbin, /lib*"]
    end
    
    LinkBin -.-> Usr
    Root --> Usr
    Root --> Boot

    Usr --> UsrBin["bin/ (git, python3)"]
    Usr --> UsrSbin["sbin/ (nginx)"]
    Usr --> UsrLocal["local/ (手动安装)"]
    Usr --> UsrLib["lib/ (库文件)"]

    subgraph sg_data [配置与数据]
        Etc["/etc/"]
        Var["/var/"]
        Tmp["/tmp/"]
    end

    Root --> Etc
    Root --> Var
    Root --> Tmp

    Etc --> NginxConf["nginx/"]
    Etc --> Systemd["systemd/system/"]
    Etc --> Ssh["ssh/"]

    Var --> Log["log/"]
    Var --> Www["www/"]

    subgraph sg_apps [应用软件]
        Opt["/opt/"]
        Snap["/snap/"]
    end

    Root --> Opt
    Root --> Snap
    
    Opt --> OpenList["openlist/"]

    subgraph sg_users [用户空间]
        Home["/home/"]
        RootHome["/root/"]
    end
    
    Root --> Home
    Root --> RootHome

    subgraph sg_virtual [虚拟文件系统]
        DirProc["/proc/"]
        DirSys["/sys/"]
        DirDev["/dev/"]
        DirRun["/run/"]
    end

    Root --> DirProc
    Root --> DirSys
    Root --> DirDev
    Root --> DirRun

    subgraph sg_mounts [外部存储]
        Mnt["/mnt/"]
        Media["/media/"]
    end

    Root --> Mnt
    Root --> Media
</pre><hr>
<h2 id="1-core-system-directory">
<a class="header-anchor" href="#1-core-system-directory"></a>
1. Core System Directory
</h2><h3 id="bin--sbin-binaries">
<a class="header-anchor" href="#bin--sbin-binaries"></a>
bin &amp; sbin (Binaries)
</h3><ul>
<li><strong>Uses</strong> : Stores executable commands.</li>
<li><strong>Note</strong>：
<ul>
<li><strong>bin</strong> : Contains basic commands that all users can use, such as <code>ls</code>, <code>cp</code>, <code>mv</code> etc.</li>
<li><strong>sbin</strong> : Contains commands primarily used for system administration; typically, only users with administrator privileges can execute them, such as <code>reboot</code>, <code>fdisk</code> etc.</li>
</ul>
</li>
</ul>
<h3 id="etc-etceteraconfiguration">
<a class="header-anchor" href="#etc-etceteraconfiguration"></a>
etc (Etcetera/Configuration)
</h3><ul>
<li><strong>Uses</strong> : Stores system and software configuration files.</li>
<li><strong>Note</strong> : Nginx configuration, user account information, network configuration, and other items are all located here. Modifying files in this directory will directly affect the behavior of the system or services.
<ul>
<li>For example: My Nginx configuration file is located at <code>/etc/nginx/nginx.conf</code>。</li>
</ul>
</li>
</ul>
<h3 id="lib-lib64-libraries">
<a class="header-anchor" href="#lib-lib64-libraries"></a>
lib, lib64 (Libraries)
</h3><ul>
<li><strong>Uses</strong> : Stores system shared libraries.</li>
<li><strong>Note</strong> : Similar to Windows <code>.dll</code> Files that provide runtime support for programs in the system.</li>
</ul>
<h3 id="systemd-system-daemons">
<a class="header-anchor" href="#systemd-system-daemons"></a>
systemd (System Daemons)
</h3><ul>
<li><strong>Key Index</strong>：<code>/etc/systemd/system/</code></li>
<li><strong>Uses</strong>：<strong>Housekeeper Headquarters</strong>。</li>
<li><strong>Note</strong> : This is where the &ldquo;service configuration files&rdquo; are stored (<code>.service</code> (file).
<ul>
<li>When you run <code>systemctl enable nginx</code> or <code>systemctl start frps</code> At that point, the system actually looks here for the corresponding file.</li>
<li><strong>docker.service.d/</strong> : Custom configuration directories for Docker services (such as proxy settings).</li>
<li>If you want a program to run automatically at startup, you&rsquo;ll need to place a configuration file here.</li>
</ul>
</li>
</ul>
<h3 id="boot-boot-loader">
<a class="header-anchor" href="#boot-boot-loader"></a>
boot (Boot Loader)
</h3><ul>
<li><strong>Uses</strong> : Startup file.</li>
<li><strong>Note</strong> : Store the kernel (<code>vmlinuz</code>) and the boot loader (GRUB). You generally don&rsquo;t need to change these unless you&rsquo;re troubleshooting boot issues on this machine.</li>
</ul>
<hr>
<h2 id="2-where-is-the-software-located-software-locations">
<a class="header-anchor" href="#2-where-is-the-software-located-software-locations"></a>
2. Where is the software located? (Software Locations)
</h2><p>On Linux, software isn&rsquo;t centralized the way it is on Windows <code>Program Files</code>...but are scattered across different locations depending on how they are installed. Here is the actual situation on my server:</p>
        
        <hr><p>Published on 2026-02-07 at <a href='https://kfjie.me/'>kj’s blog</a>, last modified on 2026-02-07</p>]]></description><category>Notes</category></item><item><title>Server Operations Tips: SSH Tunnels and Docker Network Configuration</title><link>https://kfjie.me/en/post/server-network-configuration-manual/</link><pubDate>Fri, 06 Feb 2026 13:26:00 +0800</pubDate><author>None (Kfjie)</author><guid>https://kfjie.me/en/post/server-network-configuration-manual/</guid><description>
<![CDATA[<h1>Server Operations Tips: SSH Tunnels and Docker Network Configuration</h1><p>Author: Kfjie(None)</p>
        
          <h2 id="server-operations-tips-ssh-tunnels-and-docker-network-configuration">
<a class="header-anchor" href="#server-operations-tips-ssh-tunnels-and-docker-network-configuration"></a>
Server Operations Tips: SSH Tunnels and Docker Network Configuration
</h2><p>This post records how to temporarily use a local proxy through an SSH reverse tunnel when maintaining a remote Linux server, for code downloads, dependency installation, and Docker image pulls.</p>
<p>The examples use the forwarded port <code>127.0.0.1:7890</code> on the server, configure network proxies separately for the shell and Docker daemon, and remove the temporary settings when the task is complete.</p>
        
        <hr><p>Published on 2026-02-06 at <a href='https://kfjie.me/'>kj’s blog</a>, last modified on 2026-02-06</p>]]></description><category>Guide</category></item></channel></rss>