Skip to content

Setup

Installation on Debian/Ubuntu

  1. Add the BCC repository (note: the PPA may not always provide the latest version; check official documentation for current repositories):
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:ubuntu-bugtool/bcc
    sudo apt update
    
    Alternatively, you can install from the official BCC repository or build from source for newer versions. For example, to use the official repo, add:
    echo 'deb https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/debian/ ./' | sudo tee /etc/apt/sources.list.d/bcc.list
    sudo apt update
    
    Or clone the GitHub repository and build manually.
  2. Install BCC:
    sudo apt install bpftrace
    
    This installs bpftrace, a core BCC tool for eBPF scripting.
  3. Verify installation:
    bcc --version
    bpftrace --version
    bpftrace -c 'tracepoint:raw_syscalls:sys_enter' -p $(pidof bash)
    

Installation on Red Hat/CentOS

  1. Install BCC tools via package manager (note: hardcoded version numbers in repositories may be outdated; check the official BCC release repository for the correct version):
    sudo yum install bcc-tools
    
    For newer versions, add the official BCC repository (replace {version} with the desired release, e.g., 0.23.0):
    sudo rpm --import https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/RPM-GPG-KEY-iovisor
    echo '[bcc]
    name=BCC
    baseurl=https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/rhel/8/x86_64/
    gpgcheck=1
    gpgkey=https://github.com/iovisor/bcc/releases/download/bcc-0.23.0/RPM-GPG-KEY-iovisor
    enabled=1' | sudo tee /etc/yum.repos.d/bcc.repo
    sudo yum install bcc-tools
    
  2. Verify installation:
    bcc --version
    bpftrace --version
    bpftrace -c 'tracepoint:raw_syscalls:sys_enter' -p $(pidof bash)