Debian GNU/Linux 12 (bookworm) aarch64
https://github.com/aristocratos/btop?tab=readme-ov-file#installation
#!/bin/bash
DOWNLOAD_DIR=~/downloads
LATEST_TAG=$(curl -s "https://api.github.com/repos/aristocratos/btop/releases/latest" | jq -r '.tag_name')
ARCHITECTURE=$(uname -m)
KERNEL_NAME=$(uname -s | tr '[:upper:]' '[:lower:]')
# version check
if version_info=$(btop --version); then
cur_version=$(echo "$version_info" | grep -oP '\K[0-9]+(\.[0-9]+){1,2}')
if ! dpkg --compare-versions "${LATEST_TAG//v/}" "gt" "$cur_version"; then
echo "btop is already the newest version ($cur_version)"
exit 0
fi
fi
mkdir -p "$DOWNLOAD_DIR"
cd "$DOWNLOAD_DIR" || exit 1
asset_name="btop-${ARCHITECTURE}-${KERNEL_NAME}-musl.tbz"
echo "Asset name: $asset_name"
curl -Lo btop.tbz \
"https://github.com/aristocratos/btop/releases/download/$LATEST_TAG/$asset_name"
tar -xjf btop.tbz
rm btop.tbz && rm -rf ~/btop
mv btop ~/
cd ~/btop || exit 1
sudo make install
sudo make setuid
- check and set
DOWNLOAD_DIR
- check
asset_name
jq
required
btop --version