2026-06-04
Mounting in Operating Systems
2026-06-04 ~ 2026-10-15

The note is generated by CatDesk.

What Is Mountg?

Unix-like operatg systems (Lux, macOS, BSD), mountg (挂载) is the process of attachg a file system — whether it lives on a physical device, a network share, or a virtual disk image — to a specific directory the existg directory tree. That directory is called the mount pot. Once mounted, the contents of the file system become accessible as ordary files and directories under the mount pot.

The key sight is that Unix uses a sgle unified directory tree rooted at /. Unlike Wdows, which assigns a drive letter (e.g., D:\) to each volume, Unix tegrates all storage to one hierarchy. Mountg is the mechanism that makes this possible.

2026-05-08
Clash Proxy and Meituan Intranet Coexistence
2026-05-08 ~ 2026-10-15

The note is generated by CatDesk.

Problem

After enabling Clash system proxy, Meituan intranet sites (*.sankuai.com, *.meituan.com) and internal IPs (33.x.x.x, 11.x.x.x) become inaccessible.

Root Cause Analysis

  1. Fake-IP mode interference — Clash’s fake-ip mode assigns fake IPs (198.18.x.x) to all domains, which means intranet traffic that should match IP-CIDR,10.0.0.0/8,DIRECT rules can never match because the domain was mapped to a fake IP instead of the real internal IP.
  2. Missing domain DIRECT rules — DIRECT rules for intranet domains are positioned too far down in the rule list, so higher-priority rules match first and route traffic through the proxy.
  3. Incomplete system proxy bypass list — macOS’s default proxy bypass list only includes 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, but not 33.0.0.0/8 or other Meituan internal IP ranges.

Solution (Clash Verge Rev)

Config directory: ~/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev/

2026-05-08
DNS Domain Name System
2026-05-08 ~ 2026-10-15

The note is generated by CatDesk.

What is DNS

DNS (Domain Name System) is the “phone book” of the internet. It translates human-readable domain names (like www.google.com) into machine-readable IP addresses (like 142.250.80.46). Without DNS, you’d have to memorize IP addresses for every website you visit.

How DNS Resolution Works

When you type mlp.sankuai.com in your browser, a chain of lookups happens:

Browser cache → OS cache → Router → Recursive Resolver → Root Server → TLD Server → Authoritative Server

Step by step:

2026-05-08
Fake-IP Mode Explained
2026-05-08 ~ 2026-10-15

The note is generated by CatDesk.

What is Fake-IP

Fake-IP is a DNS resolution strategy used by proxy tools like Clash (Mihomo), Clash Verge, and similar transparent proxy software. Instead of performing a real DNS lookup when an application requests a domain, the proxy immediately returns a fabricated IP address from a reserved subnet (typically 198.18.0.0/16). The proxy maintains an internal mapping table between these fake IPs and the original domains, so when traffic is later routed to a fake IP, the proxy knows which domain the traffic was actually destined for.

2026-05-07
Freeing Root Disk Space in a Container -- Without using rm
2026-05-07 ~ 2026-10-15

The note is generated by GLM-5.1.

Problem

The root filesystem (/) was 100% full (50G overlay), causing apt install, dpkg, and other system operations to fail with “No space left on device”.

Key observation: /home is mounted on a separate disk (/dev/sdab1, 251G with 229G free), so deleting files in home does not free space on the root overlay.

Constraint: sudo rm is not allowed in this environment — it is deliberately excluded from the sudoers whitelist as a safety measure. We must free 42G of disk space using only whitelisted commands (unlink, systemctl, apt, dpkg, ln, etc.).

2025-12-08
SSH转发让A server使用B server的代理
2025-12-08 ~ 2025-12-08

The note is generated by “chatGPT”.

当希望 A 服务器借用 B 服务器的代理网络(例如 Clash/Mihomo 的 7890 端口)时,可以使用 SSH 的端口转发(ssh -L)来实现。
最终效果是:

A 访问 127.0.0.1:本地端口  → 通过 SSH 转发到 B:7890 → B 的 Clash 提供代理功能

1️⃣ 前提条件

  • A 可以 SSH 登录 B

2025-11-07
Shell execution commands — source bash and dot
2025-11-07 ~ 2025-11-07

The note is generated by “ChatGPT”.

🔹 source

  • Executes a script in the current shell environment.
  • Does not create a new shell process.
  • All variable exports, alias definitions, and PATH modifications remain active after execution.
  • Commonly used for reloading configuration files (e.g., source ~/.bashrc).
  • Bash and Zsh built-in command.

Example:

1
source ~/.bashrc

→ Reloads your Bash configuration immediately in the current session.


🔹 bash

  • Starts a new Bash subshell to run the script.
  • The parent shell does not inherit any environment changes.
  • Safer for running scripts that should not affect your current session.
  • Suitable for installation, automation, or isolated execution.

Example:

2025-11-07
SSH自动登录与debug
2025-11-07 ~ 2025-11-07

The note is generated by “DeepSeek”.

一、基础设置步骤

1. 生成 SSH 密钥对(客户端)

1
2
ssh-keygen -t rsa -b 4096
# 默认保存位置:~/.ssh/id_rsa (私钥) 和 ~/.ssh/id_rsa.pub (公钥)

2. 复制公钥到服务器

方法一:使用 ssh-copy-id(推荐)

2025-10-23
10 Terminal Tricks
2025-10-23 ~ 2026-10-15

Here’s a cheat sheet of “10 Terminal Tricks Most Developers Don’t Know (But Should)” by Rishabh Agarwal: Level Up Coding

🔍 Command History & Navigation

Shortcut / CommandDescription
Ctrl + RReverse-search previously used commands from history.
!!Re-run the last executed command.
cd -Switch back to the previous directory.

🧭 Cursor Movement

ShortcutDescription
Ctrl + AJump to the start of the current command line.
Ctrl + EJump to the end of the current command line.
Alt + ← / →Move the cursor word-by-word (instead of character-by-character).

✂️ Editing Commands

ShortcutDescription
Ctrl + UDelete from cursor to the start of the line.
Ctrl + KDelete from cursor to the end of the line.

⚡ Autocomplete & Suggestions

ShortcutDescription
<Tab> <Tab>Show all possible command or path completions.

🧹 Utility

ShortcutDescription
Ctrl + LClear the terminal screen instantly.
2025-10-22
Root配置全体用户均可用的代理
2025-10-22 ~ 2025-10-22

The note is generated by chatGPT.

🌟 在 Linux 服务器上用 root 配置 Clash 服务


🪶 1. 创建目录并放置文件

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sudo mkdir -p /opt/mihomo
cd /opt/mihomo


将clash for linux的相关文件移动到/opt/mihomo:
/opt/mihomo/
├── clash-linux        # 主程序(可执行文件)
├── config.yaml        # 配置文件
├── Country.mmdb       # 国家数据库
├── GeoIP.dat          # IP 地理数据库
├── GeoSite.dat        # 网站分类数据库
├── cache.db           # 可选缓存文件

设置权限(root 拥有,程序可执行):