Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active June 5, 2025 10:02
Show Gist options
  • Save zulhfreelancer/c41d8b452cd2e615fb54a722485317ed to your computer and use it in GitHub Desktop.
Save zulhfreelancer/c41d8b452cd2e615fb54a722485317ed to your computer and use it in GitHub Desktop.
Install Speedtest CLI Script (x86_64)

Install Speedtest CLI Script (x86_64)

Usage

bash <(curl -fsSL https://gist.githubusercontent.com/zulhfreelancer/c41d8b452cd2e615fb54a722485317ed/raw/9b0167d196885c382c090d257d8346ad92f34859/install_speedtest.sh)
#!/bin/bash
set -e
# Variables
URL="https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz"
TMP_DIR=$(mktemp -d)
DEST="/usr/local/bin"
ARCHIVE_NAME="ookla-speedtest.tgz"
# Download
echo "Downloading Speedtest CLI..."
curl -L "$URL" -o "$TMP_DIR/$ARCHIVE_NAME"
# Extract
echo "Extracting..."
tar -xzf "$TMP_DIR/$ARCHIVE_NAME" -C "$TMP_DIR"
# Move binary
echo "Installing to $DEST..."
sudo mv "$TMP_DIR/speedtest" "$DEST/speedtest"
sudo chmod +x "$DEST/speedtest"
# Clean up
rm -rf "$TMP_DIR"
# Run speedtest
echo "Running speedtest..."
speedtest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment