<?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/ja/tags/linux/</link><description>Recent content from kj’s blog</description><generator>Hugo</generator><language>ja</language><managingEditor>None (Kfjie)</managingEditor><webMaster>None (Kfjie)</webMaster><copyright>本ブログのすべての文書は、特に指定されていない限り、BY-NC-SAライセンスに従っています。引用の際は出典を明記してください！</copyright><lastBuildDate>Sat, 07 Feb 2026 21:18:00 +0800</lastBuildDate><atom:link href="https://kfjie.me/ja/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux サーバーのディレクトリ構造の詳細解説</title><link>https://kfjie.me/ja/post/understanding-the-server/</link><pubDate>Sat, 07 Feb 2026 21:18:00 +0800</pubDate><author>None (Kfjie)</author><guid>https://kfjie.me/ja/post/understanding-the-server/</guid><description>
<![CDATA[<h1>Linux サーバーのディレクトリ構造の詳細解説</h1><p>著者: Kfjie(None)</p>
        
          <p>Linuxのファイルシステムはツリー構造を採用しており、すべてのファイルとディレクトリは <strong>ルートディレクトリ</strong> (<code>/</code>)。</p>
<h2 id="linux-ファイルシステムの構造図">
<a class="header-anchor" href="#linux-%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%81%ae%e6%a7%8b%e9%80%a0%e5%9b%b3"></a>
Linux ファイルシステムの構造図
</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-コアシステムのディレクトリ">
<a class="header-anchor" href="#1-%e3%82%b3%e3%82%a2%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0%e3%81%ae%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa"></a>
1. コアシステムのディレクトリ
</h2><h3 id="bin--sbin-binaries">
<a class="header-anchor" href="#bin--sbin-binaries"></a>
bin &amp; sbin (Binaries)
</h3><ul>
<li><strong>用途</strong> ：実行可能なコマンドを格納します。</li>
<li><strong>説明</strong>：
<ul>
<li><strong>bin</strong> ：すべてのユーザーが利用できる基本的なコマンドを格納しており、例えば <code>ls</code>, <code>cp</code>, <code>mv</code> など。</li>
<li><strong>sbin</strong> ：主にシステム管理に使用されるコマンドが格納されており、通常は管理者権限を持つユーザーのみが実行可能です。例えば、 <code>reboot</code>, <code>fdisk</code> など。</li>
</ul>
</li>
</ul>
<h3 id="etc-etceteraconfiguration">
<a class="header-anchor" href="#etc-etceteraconfiguration"></a>
etc (Etcetera/Configuration)
</h3><ul>
<li><strong>用途</strong> ：システムおよびソフトウェアの設定ファイルを保存する。</li>
<li><strong>説明</strong> ：Nginx の設定、ユーザーアカウント情報、ネットワーク設定などがここに格納されています。このディレクトリ内のファイルを変更すると、システムやサービスの動作に直接影響します。
<ul>
<li>例：私の Nginx 設定ファイルは次の場所にあります。 <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>用途</strong> ：システム共有ライブラリを格納する。</li>
<li><strong>説明</strong> ：Windows と同様の <code>.dll</code> ファイル。システム内のプログラムに実行時のサポートを提供します。</li>
</ul>
<h3 id="systemd-system-daemons">
<a class="header-anchor" href="#systemd-system-daemons"></a>
systemd (System Daemons)
</h3><ul>
<li><strong>主要な目次</strong>：<code>/etc/systemd/system/</code></li>
<li><strong>用途</strong>：<strong>執事の本拠地</strong>。</li>
<li><strong>説明</strong> ：ここには「サービス設定ファイル」が格納されています (<code>.service</code> （ファイル）。
<ul>
<li>実行すると <code>systemctl enable nginx</code> または <code>systemctl start frps</code> その際、システムは実際にはここから対応するファイルを探し出します。</li>
<li><strong>docker.service.d/</strong> ：Docker サービスのカスタム設定ディレクトリ（プロキシ設定など）。</li>
<li>特定のプログラムを起動時に自動的に実行させたい場合は、ここに設定ファイルを配置する必要があります。</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>用途</strong> ：起動ファイル。</li>
<li><strong>説明</strong> ：カーネルの保存 (<code>vmlinuz</code>) およびブートローダー (GRUB)。通常は手を加える必要はありませんが、このマシンの起動に関する問題を修正する場合を除きます。</li>
</ul>
<hr>
<h2 id="2-ソフトウェアはどこにあるのかsoftware-locations">
<a class="header-anchor" href="#2-%e3%82%bd%e3%83%95%e3%83%88%e3%82%a6%e3%82%a7%e3%82%a2%e3%81%af%e3%81%a9%e3%81%93%e3%81%ab%e3%81%82%e3%82%8b%e3%81%ae%e3%81%8bsoftware-locations"></a>
2. ソフトウェアはどこにあるのか？（Software Locations）
</h2><p>Linux では、ソフトウェアは Windows のように一か所に集中しておらず、 <code>Program Files</code>ではなく、設置方法に応じてさまざまな場所に分散しています。以下は、私のサーバーにおける実際の状況です：</p>
        
        <hr><p>この記事は2026-02-07に<a href='https://kfjie.me/'>kj’s blog</a>で公開され、最終更新日は2026-02-07です</p>]]></description><category>Notes</category></item><item><title>サーバー運用のヒント：SSHトンネルとDockerネットワーク設定</title><link>https://kfjie.me/ja/post/server-network-configuration-manual/</link><pubDate>Fri, 06 Feb 2026 13:26:00 +0800</pubDate><author>None (Kfjie)</author><guid>https://kfjie.me/ja/post/server-network-configuration-manual/</guid><description>
<![CDATA[<h1>サーバー運用のヒント：SSHトンネルとDockerネットワーク設定</h1><p>著者: Kfjie(None)</p>
        
          <h2 id="サーバー運用のヒントsshトンネルとdockerネットワーク設定">
<a class="header-anchor" href="#%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e9%81%8b%e7%94%a8%e3%81%ae%e3%83%92%e3%83%b3%e3%83%88ssh%e3%83%88%e3%83%b3%e3%83%8d%e3%83%ab%e3%81%a8docker%e3%83%8d%e3%83%83%e3%83%88%e3%83%af%e3%83%bc%e3%82%af%e8%a8%ad%e5%ae%9a"></a>
サーバー運用のヒント：SSHトンネルとDockerネットワーク設定
</h2><p>リモートのLinuxサーバーを保守するときに、SSHリバーストンネル経由でローカルのプロキシを一時的に利用し、コードのダウンロード、依存パッケージのインストール、Dockerイメージの取得を行う手順を記録します。</p>
        
        <hr><p>この記事は2026-02-06に<a href='https://kfjie.me/'>kj’s blog</a>で公開され、最終更新日は2026-02-06です</p>]]></description><category>Guide</category></item></channel></rss>