Ubuntu / Debian / Arch Linux 桌面与命令行代理配置教程
核心结论速览
Linux 桌面发行版可直接使用 Clash Verge Rev(.deb/.AppImage)或 Mihomo 核心配合 systemd 运行;命令行工具如 curl、git 与 apt 需在环境变量或包管理器配置中显式指定本地端口或启用 TUN。
1. 桌面端安装与 TUN 权限
Ubuntu/Debian 用户可下载官方 .deb 包安装;若无图形界面(纯无头服务器),可使用 mihomo 二进制配合 systemd 托管运行并通过网页控制台切换节点。
2. Bash/Zsh 与 apt 代理设置
假设本地混合端口为 7897,临时使用 apt 更新海外源时可直接注入环境变量:
sudo http_proxy=http://127.0.0.1:7897 https_proxy=http://127.0.0.1:7897 apt update