main
Use $'...' (ANSI-C quoting) instead of '...' for color variables so they contain real escape bytes. Fixes raw \033[1m appearing in output when color codes are passed through printf %s arguments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bbr-setup
Bash script that enables TCP BBR congestion control on Linux servers with a single command.
Quick start
curl -fsSL https://raw.githubusercontent.com/halofourteen/bbr-setup/main/setup.sh | sudo bash
Or clone and run locally:
git clone https://github.com/halofourteen/bbr-setup.git
cd bbr-setup
sudo bash setup.sh
What it does
- Verifies root permissions, distro, and kernel version (4.9+ required)
- Checks that the
tcp_bbrmodule is available - Backs up existing sysctl configuration
- Writes BBR parameters to
/etc/sysctl.d/99-bbr.conf(or/etc/sysctl.confas fallback) - Applies and verifies the new settings
Parameters applied:
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
Usage
bbr-setup 1.0.0 — enable TCP BBR congestion control
Usage: setup.sh [OPTIONS]
Options:
--check Show current BBR status and exit
--dry-run Show what would be done without making changes
-h, --help Show this help message
-v, --version Show version
Examples
Apply BBR:
sudo bash setup.sh
Check current status without changing anything:
sudo bash setup.sh --check
Preview what would be changed:
sudo bash setup.sh --dry-run
Supported distributions
- Debian / Ubuntu
- CentOS / RHEL / Fedora
- Alpine Linux
- Arch Linux
- Any Linux with kernel 4.9+ and the
tcp_bbrmodule
Exit codes
| Code | Meaning |
|---|---|
0 |
Success or BBR already enabled |
1 |
Error (missing root, old kernel, module unavailable, verification failed) |
License
Languages
Shell
100%