github.com/sagernet/sing-box@v1.9.0-rc.20/docs/installation/package-manager.md (about) 1 --- 2 icon: material/package 3 --- 4 5 # Package Manager 6 7 ## :material-tram: Repository Installation 8 9 === ":material-debian: Debian / APT" 10 11 ```bash 12 sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc 13 sudo chmod a+r /etc/apt/keyrings/sagernet.asc 14 echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \ 15 sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null 16 sudo apt-get update 17 sudo apt-get install sing-box # or sing-box-beta 18 ``` 19 20 === ":material-redhat: Redhat / DNF" 21 22 ```bash 23 sudo dnf -y install dnf-plugins-core 24 sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo 25 sudo dnf install sing-box # or sing-box-beta 26 ``` 27 28 === ":material-redhat: CentOS / YUM" 29 30 ```bash 31 sudo yum install -y yum-utils 32 sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo 33 sudo yum install sing-box # or sing-box-beta 34 ``` 35 36 ## :material-download-box: Manual Installation 37 38 === ":material-debian: Debian / DEB" 39 40 ```bash 41 bash <(curl -fsSL https://sing-box.app/deb-install.sh) 42 ``` 43 44 === ":material-redhat: Redhat / RPM" 45 46 ```bash 47 bash <(curl -fsSL https://sing-box.app/rpm-install.sh) 48 ``` 49 50 === ":simple-archlinux: Archlinux / PKG" 51 52 ```bash 53 bash <(curl -fsSL https://sing-box.app/arch-install.sh) 54 ``` 55 56 ## :material-book-lock-open: Managed Installation 57 58 === ":material-linux: Linux" 59 60 | Type | Platform | Command | Link | 61 |----------|---------------|------------------------------|---------------------------------------------------------------------------------------------------------------| 62 | AUR | Arch Linux | `? -S sing-box` | [![AUR package](https://repology.org/badge/version-for-repo/aur/sing-box.svg)][aur] | 63 | nixpkgs | NixOS | `nix-env -iA nixos.sing-box` | [![nixpkgs unstable package](https://repology.org/badge/version-for-repo/nix_unstable/sing-box.svg)][nixpkgs] | 64 | Homebrew | macOS / Linux | `brew install sing-box` | [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/sing-box.svg)][brew] | 65 | APK | Alpine | `apk add sing-box` | [![Alpine Linux Edge package](https://repology.org/badge/version-for-repo/alpine_edge/sing-box.svg)][alpine] | 66 67 === ":material-apple: macOS" 68 69 | Type | Platform | Command | Link | 70 |----------|----------|-------------------------|------------------------------------------------------------------------------------------------| 71 | Homebrew | macOS | `brew install sing-box` | [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/sing-box.svg)][brew] | 72 73 === ":material-microsoft-windows: Windows" 74 75 | Type | Platform | Command | Link | 76 |------------|----------|---------------------------|-----------------------------------------------------------------------------------------------------| 77 | Scoop | Windows | `scoop install sing-box` | [![Scoop package](https://repology.org/badge/version-for-repo/scoop/sing-box.svg)][scoop] | 78 | Chocolatey | Windows | `choco install sing-box` | [![Chocolatey package](https://repology.org/badge/version-for-repo/chocolatey/sing-box.svg)][choco] | 79 | winget | Windows | `winget install sing-box` | [![winget package](https://repology.org/badge/version-for-repo/winget/sing-box.svg)][winget] | 80 81 === ":material-android: Android" 82 83 | Type | Platform | Command | Link | 84 |--------|----------|--------------------|----------------------------------------------------------------------------------------------| 85 | Termux | Android | `pkg add sing-box` | [![Termux package](https://repology.org/badge/version-for-repo/termux/sing-box.svg)][termux] | 86 87 === ":material-freebsd: FreeBSD" 88 89 | Type | Platform | Command | Link | 90 |------------|----------|------------------------|--------------------------------------------------------------------------------------------| 91 | FreshPorts | FreeBSD | `pkg install sing-box` | [![FreeBSD port](https://repology.org/badge/version-for-repo/freebsd/sing-box.svg)][ports] | 92 93 ## :material-book-multiple: Service Management 94 95 For Linux systems with [systemd][systemd], usually the installation already includes a sing-box service, 96 you can manage the service using the following command: 97 98 | Operation | Command | 99 |-----------|-----------------------------------------------| 100 | Enable | `sudo systemctl enable sing-box` | 101 | Disable | `sudo systemctl disable sing-box` | 102 | Start | `sudo systemctl start sing-box` | 103 | Stop | `sudo systemctl stop sing-box` | 104 | Kill | `sudo systemctl kill sing-box` | 105 | Restart | `sudo systemctl restart sing-box` | 106 | Logs | `sudo journalctl -u sing-box --output cat -e` | 107 | New Logs | `sudo journalctl -u sing-box --output cat -f` | 108 109 [alpine]: https://pkgs.alpinelinux.org/packages?name=sing-box 110 111 [aur]: https://aur.archlinux.org/packages/sing-box 112 113 [nixpkgs]: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/networking/sing-box/default.nix 114 115 [brew]: https://formulae.brew.sh/formula/sing-box 116 117 [openwrt]: https://github.com/openwrt/packages/tree/master/net/sing-box 118 119 [immortalwrt]: https://github.com/immortalwrt/packages/tree/master/net/sing-box 120 121 [choco]: https://chocolatey.org/packages/sing-box 122 123 [scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/sing-box.json 124 125 [winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/SagerNet/sing-box 126 127 [termux]: https://github.com/termux/termux-packages/tree/master/packages/sing-box 128 129 [ports]: https://www.freshports.org/net/sing-box 130 131 [systemd]: https://systemd.io/