mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-02-18 15:24:43 +00:00
8 KiB
8 KiB
icon |
---|
material/package |
Package Manager
:material-tram: Repository Installation
=== ":material-debian: Debian / APT"
```bash
sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc
sudo chmod a+r /etc/apt/keyrings/sagernet.asc
echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \
sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null
sudo apt-get update
sudo apt-get install sing-box # or sing-box-beta
```
=== ":material-redhat: Redhat / DNF"
```bash
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo
sudo dnf install sing-box # or sing-box-beta
```
(This applies to any distribution that uses `dnf` as the package manager: Fedora, CentOS, even OpenSUSE with DNF installed.)
:material-download-box: Manual Installation
=== ":material-debian: Debian / DEB"
```bash
bash <(curl -fsSL https://sing-box.app/deb-install.sh)
```
=== ":material-redhat: Redhat / RPM"
```bash
bash <(curl -fsSL https://sing-box.app/rpm-install.sh)
```
(This applies to any distribution that uses `rpm` and `systemd`. Because of how `rpm` defines dependencies, if it installs, it probably works.)
=== ":simple-archlinux: Archlinux / PKG"
```bash
bash <(curl -fsSL https://sing-box.app/arch-install.sh)
```
:material-book-lock-open: Managed Installation
=== ":material-linux: Linux"
| Type | Platform | Command | Link |
|----------|---------------|------------------------------|---------------------------------------------------------------------------------------------------------------|
| AUR | Arch Linux | `? -S sing-box` | [][aur] |
| nixpkgs | NixOS | `nix-env -iA nixos.sing-box` | [][nixpkgs] |
| Homebrew | macOS / Linux | `brew install sing-box` | [][brew] |
| APK | Alpine | `apk add sing-box` | [][alpine] |
| DEB | AOSC | `apt install sing-box` | [][aosc] |
=== ":material-apple: macOS"
| Type | Platform | Command | Link |
|----------|----------|-------------------------|------------------------------------------------------------------------------------------------|
| Homebrew | macOS | `brew install sing-box` | [][brew] |
=== ":material-microsoft-windows: Windows"
| Type | Platform | Command | Link |
|------------|----------|---------------------------|-----------------------------------------------------------------------------------------------------|
| Scoop | Windows | `scoop install sing-box` | [][scoop] |
| Chocolatey | Windows | `choco install sing-box` | [][choco] |
| winget | Windows | `winget install sing-box` | [][winget] |
=== ":material-android: Android"
| Type | Platform | Command | Link |
|--------|----------|--------------------|----------------------------------------------------------------------------------------------|
| Termux | Android | `pkg add sing-box` | [][termux] |
=== ":material-freebsd: FreeBSD"
| Type | Platform | Command | Link |
|------------|----------|------------------------|--------------------------------------------------------------------------------------------|
| FreshPorts | FreeBSD | `pkg install sing-box` | [][ports] |
:material-alert: Problematic Sources
Type | Platform | Link | Promblem(s) |
---|---|---|---|
DEB | AOSC | aosc-os-abbs | Problematic build tag list modification |
Homebrew | / | homebrew-core | Problematic build tag list modification |
Termux | Android | termux-packages | Problematic build tag list modification |
FreshPorts | FreeBSD | FreeBSD ports | Old Go (go1.20) |
If you are a user of them, please report issues to them:
- Please do not modify release build tags without full understanding of the related functionality: enabling non-default labels may result in decreased performance; the lack of default labels may cause user confusion.
- sing-box supports compiling with some older Go versions, but it is not recommended (especially versions that are no longer supported by Go).
:material-book-multiple: Service Management
For Linux systems with systemd, usually the installation already includes a sing-box service, you can manage the service using the following command:
Operation | Command |
---|---|
Enable | sudo systemctl enable sing-box |
Disable | sudo systemctl disable sing-box |
Start | sudo systemctl start sing-box |
Stop | sudo systemctl stop sing-box |
Kill | sudo systemctl kill sing-box |
Restart | sudo systemctl restart sing-box |
Logs | sudo journalctl -u sing-box --output cat -e |
New Logs | sudo journalctl -u sing-box --output cat -f |