在debian上安装 sing-box

[TOC]

官方一键安装脚本

Ctrl+C 复制 Ctrl+S 导出
curl -fsSL https://sing-box.app/install.sh | sh
1 行

内部运行指令

Ctrl+C 复制 Ctrl+S 导出
/usr/bin/sing-box -D /var/lib/sing-box -C /etc/sing-box run
1 行
  • 配置文件路径 /etc/sing-box 下的 config.json (需要手动创建)

管理服务

操作命令
Enablesudo systemctl enable sing-box
Disablesudo systemctl disable sing-box
Startsudo systemctl start sing-box
Stopsudo systemctl stop sing-box
Killsudo systemctl kill sing-box
Restartsudo systemctl restart sing-box
Logssudo journalctl -u sing-box --output cat -e
New Logssudo journalctl -u sing-box --output cat -f