The hyperfine command is a modern, high-precision command-line benchmarking tool written in Rust that measures program execution speeds with statistical analysis, warmup runs, parameter parameterized sweeps, and exportable JSON or Markdown timing reports. In newly deployed minimal Linux installations, container base images, or remote CI/CD build agents, executing hyperfine returns bash: hyperfine: command not found because the utility is not part of default Linux distributions.
Install hyperfine via Pre-Compiled Static Release Binary
Installing the official pre-compiled release binary is the fastest, cleanest approach for minimal systems without Rust build toolchains:
# Download latest hyperfine archive for Linux x86_64
curl -sSL https://github.com/sharkdp/hyperfine/releases/latest/download/hyperfine-v1.18.0-x86_64-unknown-linux-musl.tar.gz -o /tmp/hyperfine.tar.gz
# Extract binary directly into system bin
sudo tar -xzf /tmp/hyperfine.tar.gz -C /usr/local/bin/ --strip-components=1
# Ensure executable execution permissions
sudo chmod +x /usr/local/bin/hyperfine
# Clean up archive
rm -f /tmp/hyperfine.tar.gz
# Verify installation
hyperfine --version
Install via Linux Distribution Repositories
Most modern Linux package managers feature hyperfine directly in official repositories:
# On Debian or Ubuntu (20.04+):
sudo apt update && sudo apt install -y hyperfine
# On Arch Linux:
sudo pacman -S hyperfine
# On Alpine Linux:
apk add hyperfine
# On systems with Homebrew:
brew install hyperfine
Benchmark Commands with Warmup Runs
Once installed, execute precision benchmarks between competing shell utilities:
# Compare execution timing between find and fd
hyperfine --warmup 3 'find . -name "*.log"' 'fd -e log'