From 32b4a0393a4372a488a6589bdcbc3d87738db2ab Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:57:03 +0800 Subject: [PATCH] Update README --- INSTALL.md | 83 +++++++++++++++++++++++++++ README.md | 160 ++++++++++++++++++++--------------------------------- 2 files changed, 144 insertions(+), 99 deletions(-) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..e3e438b7 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,83 @@ +# Installation + +- [Installation](#installation) + - [Arch Linux](#arch-linux) + - [Exherbo Linux](#exherbo-linux) + - [Nix/NixOS](#nixnixos) + - [Void Linux](#void-linux) + - [Fedora](#fedora) + - [macOS/Linux (using Homebrew)](#macoslinux-using-homebrew) + - [macOS (using MacPorts)](#macos-using-macports) + - [FreeBSD](#freebsd) + - [Cargo](#cargo) + +## Arch Linux + +``` +pacman -S bandwhich +``` + +## Exherbo Linux + +`bandwhich` is available in [rust repository](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/sys-apps/bandwhich), and can be installed via `cave`: + +``` +cave resolve -x repository/rust +cave resolve -x bandwhich +``` + +## Nix/NixOS + +`bandwhich` is available in [`nixpkgs`](https://github.com/nixos/nixpkgs/blob/master/pkgs/tools/networking/bandwhich/default.nix), and can be installed, for example, with `nix-env`: + +``` +nix-env -iA nixpkgs.bandwhich +``` + +## Void Linux + +``` +xbps-install -S bandwhich +``` + +## Fedora + +`bandwhich` is available in [COPR](https://copr.fedorainfracloud.org/coprs/atim/bandwhich/), and can be installed via DNF: + +``` +sudo dnf copr enable atim/bandwhich -y && sudo dnf install bandwhich +``` + +## macOS/Linux (using Homebrew) + +``` +brew install bandwhich +``` + +## macOS (using MacPorts) + +``` +sudo port selfupdate +sudo port install bandwhich +``` + +## FreeBSD + +``` +pkg install bandwhich +``` + +or + +``` +cd /usr/ports/net-mgmt/bandwhich && make install clean +``` + +## Cargo + +Regardless of OS, you can always fallback to the Rust package manager, `cargo`. +For installation instructions of the Rust toolchain, see [here](https://www.rust-lang.org/tools/install). + +``` +cargo install bandwhich +``` diff --git a/README.md b/README.md index c488982b..967b43a6 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,9 @@ This is a CLI utility for displaying current network utilization by process, con - [Installation](#installation) - [Downstream packaging status](#downstream-packaging-status) - [Download a prebuilt binary](#download-a-prebuilt-binary) - - [Arch Linux](#arch-linux) - - [Exherbo Linux](#exherbo-linux) - - [Nix/NixOS](#nixnixos) - - [Void Linux](#void-linux) - - [Fedora](#fedora) - - [macOS/Linux (using Homebrew)](#macoslinux-using-homebrew) - - [macOS (using MacPorts)](#macos-using-macports) - - [FreeBSD](#freebsd) - - [Building from source using `cargo`](#building-from-source-using-cargo) - - [OpenWRT](#openwrt) + - [Building from source](#building-from-source) + - [Cross-compiling](#cross-compiling) + - [Android](#android) - [Post install (Linux)](#post-install-linux) - [1. `setcap`](#1-setcap) - [Capabilities explained](#capabilities-explained) @@ -51,113 +44,82 @@ For more details, see [The Future of Bandwhich #275](https://github.com/imsnif/b ### Downstream packaging status +For detailed instructions for each platform, see [INSTALL.md](INSTALL.md). + ### Download a prebuilt binary -If you're on `android` or `linux`, you can download the generic binary from the [releases](https://github.com/imsnif/bandwhich/releases) - -### Arch Linux - -``` -pacman -S bandwhich -``` - -### Exherbo Linux - -`bandwhich` is available in [rust repository](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/sys-apps/bandwhich), and can be installed via `cave`: - -``` -cave resolve -x repository/rust -cave resolve -x bandwhich -``` - -### Nix/NixOS - -`bandwhich` is available in [`nixpkgs`](https://github.com/nixos/nixpkgs/blob/master/pkgs/tools/networking/bandwhich/default.nix), and can be installed, for example, with `nix-env`: - -``` -nix-env -iA nixpkgs.bandwhich -``` - -### Void Linux - -``` -xbps-install -S bandwhich -``` - -### Fedora - -`bandwhich` is available in [COPR](https://copr.fedorainfracloud.org/coprs/atim/bandwhich/), and can be installed via DNF: - -``` -sudo dnf copr enable atim/bandwhich -y && sudo dnf install bandwhich -``` - -### macOS/Linux (using Homebrew) - -``` -brew install bandwhich -``` - -### macOS (using MacPorts) - -``` -sudo port selfupdate -sudo port install bandwhich -``` - -### FreeBSD - -``` -pkg install bandwhich -``` - -or +We offer several generic binaries in [releases](https://github.com/imsnif/bandwhich/releases) for various OSes. + +
OS | Architecture | Support | Usage | + + +
---|---|---|---|
Android | aarch64 | Best effort | +
+ All modern Android devices. +Note that this is a pure binary file, not an APK suitable for general usage. + |
+
Linux | aarch64 | Full | +64-bit ARMv8+ (servers, some modern routers, RPi-4+). | +
armv7hf | Best effort | 32-bit ARMv7 (older routers, pre-RPi-4). | +|
x64-gnu | Full | +Most Linux desktops & servers. | +|
MacOS | aarch64 | Full | +Apple silicon Macs (2021+). | +
x64 | +Intel Macs (pre-2021). | +||
Windows | x64 | Full | +Most Windows desktops & servers. | +