How to Install Siege on Ubuntu (26.04, 24.04, 22.04)

Last updated Wednesday, March 4, 2026 4:29 pm Joshua James 11 min read

Load testing is much easier before a traffic spike exposes slow pages or fragile application code. To install Siege on Ubuntu, you can use the repository package for the quickest setup or compile the upstream source when you want the newest release in /usr/local/bin.

The Ubuntu package is the right fit for most systems because it only takes one command and follows normal APT updates. Source compilation is still useful when you want the latest upstream release now, and the build flags below keep the current tarball building on Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS.

Install Siege on Ubuntu

Two installation paths are available for Siege on Ubuntu. The APT package is the fastest option for most benchmarks, while the source build installs the current upstream release in /usr/local/bin.

MethodChannelVersionUpdatesBest For
APT Package ManagerUbuntu RepositoriesDistribution defaultAutomatic through APTMost users who want the quickest setup
Source CompilationOfficial Siege DownloadsLatest upstream releaseManual rebuildsUsers who want the newest upstream build in /usr/local/bin

For most users, the APT method is recommended because it keeps Siege tied to Ubuntu updates and takes less maintenance. Compile from source only when you specifically want the upstream release ahead of Ubuntu’s packaged version.

This guide covers Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. The APT and source steps stay consistent across all three releases, and the source build uses a more explicit configure line so Siege 4.1.7 also compiles cleanly on Ubuntu 26.04.

Update Ubuntu Before Installing Siege

Refresh package metadata first so Ubuntu sees the latest repository state before you install anything new.

sudo apt update && sudo apt upgrade

This guide uses sudo for commands that need root privileges. If your account is not in the sudoers file yet, follow the guide on how to add a new user to sudoers on Ubuntu before continuing.

Method 1: Install Siege from Ubuntu Repositories

Ubuntu already ships the siege package in its default repositories. Ubuntu 26.04 currently installs Siege 4.1.6, while Ubuntu 24.04 and 22.04 install Siege 4.0.7.

sudo apt install siege

Verify that the package is installed and available in your shell:

siege --version
SIEGE 4.1.6

Copyright (C) 2023 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

On Ubuntu 24.04 LTS and 22.04 LTS, the same version check currently reports SIEGE 4.0.7.

Method 2: Compile Siege from Source on Ubuntu

Compile Siege from source when you want the upstream release instead of Ubuntu’s packaged build. If you keep both methods installed, the source build in /usr/local/bin takes priority over the repository binary in /usr/bin.

Install Siege Build Dependencies

Install the compiler toolchain, zlib headers, and wget before you download the upstream source archive.

sudo apt install build-essential zlib1g-dev wget

Download the Siege Source Archive

Use a dedicated build directory under your home folder so the extracted source tree is easy to remove later.

mkdir -p ~/src/siege-build
cd ~/src/siege-build
wget https://download.joedog.org/siege/siege-latest.tar.gz
tar -xzf siege-latest.tar.gz
cd siege-*/
--2026-03-04 16:19:33--  https://download.joedog.org/siege/siege-latest.tar.gz
Resolving download.joedog.org (download.joedog.org)... 172.67.132.100, 104.21.4.201, 2606:4700:3034::ac43:8464, ...
Connecting to download.joedog.org (download.joedog.org)|172.67.132.100|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 543447 (531K) [application/x-tar]
Saving to: 'siege-latest.tar.gz'

2026-03-04 16:19:34 (3.77 MB/s) - 'siege-latest.tar.gz' saved [543447/543447]

Compile and Install Siege

The extra CPPFLAGS and CFLAGS keep Siege 4.1.7 building on Ubuntu 26.04’s newer toolchain and still work on Ubuntu 24.04 and 22.04.

CPPFLAGS="-DHAVE_STRCASECMP -DHAVE_STRNCASECMP" CFLAGS="-std=gnu17" ./configure --with-zlib
make
sudo make install
Configuration is complete

Run the following commands to complete the installation:
  make
  make install

For complete documentation:        http://www.joedog.org
--------------------------------------------------------
Making install in html
make[3]: Entering directory '/home/linuxcapable/siege-source-26-fix/siege-4.1.7/html'
HTML pages not installed
make[3]: Leaving directory '/home/linuxcapable/siege-source-26-fix/siege-4.1.7/html'

Verify the Source Build

Check that the source build is the active binary and that it reports the upstream version:

which siege
siege --version
/usr/local/bin/siege
SIEGE 4.1.7

Copyright (C) 2024 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

If both installation methods are present, /usr/local/bin/siege from the source build stays first in Ubuntu’s default PATH. Removing the source build later returns control to the APT package at /usr/bin/siege.

Create a Siege Update Script

Save this helper script when you want an easy way to compare your installed version with the latest upstream tarball and rebuild Siege in the same way later.

nano ~/update-siege.sh

Paste the script below into that file, save it, and then make it executable.

If you use nano, press Ctrl+O, then Enter to save the file, and Ctrl+X to exit the editor.

#!/usr/bin/env bash
set -euo pipefail

# Install location and update workspace
INSTALL_PREFIX="/usr/local"
BUILD_ROOT="$HOME/src/siege-update"
ARCHIVE_NAME="siege-latest.tar.gz"
LOG_FILE="$HOME/siege-update.log"

# Confirm the required build tools are available
for cmd in gcc make wget tar awk; do
    if ! command -v "$cmd" > /dev/null 2>&1; then
        echo "Missing required command: $cmd"
        echo "Install the dependencies first with: sudo apt install build-essential zlib1g-dev wget"
        exit 1
    fi
done

mkdir -p "$BUILD_ROOT"
cd "$BUILD_ROOT"

echo "Downloading the latest Siege source archive..."
rm -f "$ARCHIVE_NAME"
wget -q "https://download.joedog.org/siege/$ARCHIVE_NAME"

# Read the version from the tarball's top-level directory
LATEST_DIR=$(tar -tzf "$ARCHIVE_NAME" | head -n 1 | cut -d/ -f1)
LATEST_VERSION=${LATEST_DIR#siege-}

if [ -x "$INSTALL_PREFIX/bin/siege" ]; then
    CURRENT_VERSION=$("$INSTALL_PREFIX/bin/siege" --version | awk '/^SIEGE / { print $2; exit }')
else
    CURRENT_VERSION="none"
fi

echo "Current version: $CURRENT_VERSION"
echo "Latest version:  $LATEST_VERSION"

if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
    echo "Siege is already up to date."
    exit 0
fi

echo "Extracting Siege $LATEST_VERSION..."
rm -rf "$LATEST_DIR"
tar -xzf "$ARCHIVE_NAME"
cd "$LATEST_DIR"

echo "Configuring the build..."
CPPFLAGS="-DHAVE_STRCASECMP -DHAVE_STRNCASECMP" CFLAGS="-std=gnu17" ./configure --with-zlib

echo "Compiling Siege..."
make

echo "Installing Siege to $INSTALL_PREFIX..."
sudo make install

NEW_VERSION=$("$INSTALL_PREFIX/bin/siege" --version | awk '/^SIEGE / { print $2; exit }')
echo "$(date '+%Y-%m-%d %H:%M:%S') Updated Siege to $NEW_VERSION" >> "$LOG_FILE"
echo "Installed version: $NEW_VERSION"

echo "Cleaning up the extracted source tree..."
cd "$BUILD_ROOT"
rm -rf "$LATEST_DIR"

echo "Update complete."
chmod +x ~/update-siege.sh
~/update-siege.sh
Downloading the latest Siege source archive...
Current version: 4.1.7
Latest version:  4.1.7
Siege is already up to date.

If upstream publishes a newer release, the script continues into the configure, build, and install stages automatically.

Avoid running this with cron. Rebuilding source packages can fail because of dependency changes, compiler changes, or upstream tarball updates. Run the script manually so you can review the output before it changes your system.

Configure Siege on Ubuntu

Both installation methods create the active user config in ~/.siege/siege.conf on first run. The APT package keeps its templates in /etc/siege/, while the source build uses /usr/local/etc/.

View the Active Siege Configuration

Run siege -C to print the currently active configuration, including the resource file, URL list, and log destination.

siege -C
CURRENT  SIEGE  CONFIGURATION
Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/4.1.7
Edit the resource file to change the settings.
----------------------------------------------
version:                        4.1.7
verbose:                        true
color:                          true
quiet:                          false
debug:                          false
protocol:                       HTTP/1.1
HTML parser:                    enabled
get method:                     HEAD
connection:                     close
concurrent users:               25

Edit Siege Defaults

Edit the user config file when you want to change your default concurrency, delays, logging, or CSV output.

nano ~/.siege/siege.conf

These settings are the ones most readers change first:

  • verbose: Show detailed request output during each test
  • csv: Write output in CSV format for later analysis
  • concurrent: Set the number of simulated users
  • time: Set how long the test runs, such as 1M or 30S
  • delay: Add a pause between requests from each user
  • benchmark: Remove delays so Siege fires requests as fast as possible

Example settings for a 25-user test with one-second pauses between requests:

verbose = false
csv = true
concurrent = 25
time = 1H
delay = 1S
internet = false
benchmark = false

Check the Active Siege Log Path

Confirm the log destination on your system before you enable logging, because the APT package and the source build report different default paths.

siege -C | grep "log file"
APT package:
log file:                       /var/log/log/siege.log

Source build:
log file:                       /usr/local/var/log/siege.log

The APT package currently reports /var/log/log/siege.log through siege -C, even though the packaged comments still reference /var/log/siege.log. Check your local output before you rely on either path, then run a test once logging is enabled so Siege can create the file.

Run HTTP Load Tests with Siege on Ubuntu

Only run load tests against systems you own or have explicit permission to test. Unauthorized benchmarking can violate acceptable-use policies, trigger incident response, or be treated as a denial-of-service attack.

Once Siege is installed, you can use it for quick checks against a single URL or longer runs against a custom URL list.

Run a Basic Siege Load Test

This command runs a one-minute test against a single URL with Siege’s default concurrency value.

siege https://www.example.com -t 1m

Siege prints a summary at the end of the run with availability, response time, throughput, and completed transactions. Use longer tests when you want steadier numbers than a quick smoke check provides.

** SIEGE 4.1.7
** Preparing 25 concurrent users for battle.
The server is now under siege...

Lifting the server siege...
Transactions:             1165 hits
Availability:             100.00 %
Elapsed time:               5.39 secs
Data transferred:           1.36 MB
Response time:            105.06 ms
Transaction rate:         216.14 trans/sec
Throughput:                 0.25 MB/sec
Successful transactions:   1165
Failed transactions:          0

Increase Siege Concurrent Users

Use the -c flag when you want more simultaneous users hitting the same target.

siege https://www.example.com -c 100 -t 2m

Higher concurrency is useful when you want to compare reverse proxy tuning, PHP worker counts, database caching, or other changes under heavier traffic.

Test Multiple URLs with Siege

Put your target URLs in a user-owned file so the same workflow works for the APT package and the source build.

nano ~/siege-urls.txt
https://www.example.com
https://www.example.com/api/endpoint
https://www.example.com/products

Run the list with -f after you save the file:

siege -f ~/siege-urls.txt

Add Delay Between Siege Requests

Use -d when you want a more natural request pattern instead of nonstop benchmarking traffic.

siege https://www.example.com -c 50 -d 5

This example keeps 50 concurrent users active and inserts a random pause of up to five seconds between their requests.

Test POST and PUT Requests with Siege

Siege can replay API requests from the same URL file format you use for basic page tests.

nano ~/siege-urls.txt
https://api.example.com/users POST name=testuser&email=test@example.com
https://api.example.com/data PUT {"key":"value"}
https://api.example.com/upload POST </path/to/data.json

Run the request list and send the correct content type header with it:

siege -f ~/siege-urls.txt -H "Content-Type: application/json"

Enable Siege Logging on Ubuntu

Turn logging on in your user config file when you want Siege to keep a persistent run history instead of only printing the end-of-test summary.

nano ~/.siege/siege.conf
logging = true
show-logfile = true

After you save the file, rerun siege -C | grep "log file" so you know which path your build is using before you review the logs.

Remove Siege from Ubuntu

Use the removal path that matches the way Siege was installed on your system.

Remove the APT Siege Package

Remove the package first, then clean up any now-unused dependencies.

sudo apt remove siege
sudo apt autoremove

If you also want to remove the packaged configuration files under /etc/siege/, purge the package after the normal removal step:

sudo apt purge siege

The next command permanently deletes your user config and cookies in ~/.siege/. Back up ~/.siege/siege.conf first if you want to keep custom defaults or saved test data.

rm -rf ~/.siege

Verify that the APT package is no longer installed:

dpkg -l siege | grep '^ii'

No output means the package is no longer installed.

Remove the Source-Compiled Siege Build

Delete the binaries and config files that make install placed under /usr/local.

sudo rm -f /usr/local/bin/siege /usr/local/bin/bombardment /usr/local/bin/siege2csv.pl /usr/local/bin/siege.config
sudo rm -f /usr/local/etc/siegerc /usr/local/etc/urls.txt
sudo rm -f /usr/local/var/log/siege.log

The next command permanently deletes your user config, source tree, update workspace, and the helper script from this guide. Back up ~/.siege/siege.conf first if you want to keep your current defaults.

rm -rf ~/.siege ~/src/siege-build ~/src/siege-update ~/update-siege.sh

Confirm that the source-installed binary is gone from /usr/local/bin:

test ! -x /usr/local/bin/siege && echo "Source build removed from /usr/local/bin"
Source build removed from /usr/local/bin

If the APT package is still installed, removing the source build exposes /usr/bin/siege again automatically because it remains later in Ubuntu’s default PATH.

Frequently Asked Questions

Is Siege available in Ubuntu’s default repositories?

Yes. The package name is siege, and it is available from Ubuntu’s default repositories on Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. Ubuntu 26.04 currently installs Siege 4.1.6, while Ubuntu 24.04 and 22.04 install Siege 4.0.7.

Where does Siege store its configuration on Ubuntu?

Both installation methods create the active user config in ~/.siege/siege.conf and store cookies in ~/.siege/cookies.txt. The APT package keeps its system templates in /etc/siege/, while the source build uses /usr/local/etc/.

Can the Ubuntu package and source build of Siege stay installed together?

Yes. Ubuntu can keep both copies installed at the same time, but /usr/local/bin/siege from the source build takes priority over /usr/bin/siege from the APT package because /usr/local/bin appears earlier in the default PATH.

Conclusion

Siege is installed on Ubuntu and ready for quick repository-based benchmarks or a newer upstream build in /usr/local/bin. If you need something to benchmark next, set up Nginx on Ubuntu or Apache on Ubuntu.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffee Buy me a coffee

Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<a href="URL">link</a> link
<blockquote>quote</blockquote> quote block

Leave a Comment

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: