Blog
Wild & Free Tools

Merge PDF Files on Linux or Ubuntu — Browser Tool vs Command Line

Last updated: February 2026 5 min read
Quick Answer

Table of Contents

  1. Browser method on Linux (no install)
  2. pdftk — the command-line standard
  3. ghostscript — pre-installed on many distros
  4. pdfunite — lightweight poppler-utils option
  5. Which method to use on Linux
  6. Frequently Asked Questions

Linux users have more options for merging PDFs than most people realize. The browser PDF merger works in Chrome and Firefox on any distro without installing anything beyond the browser you already have. Or, if you prefer the terminal, a single command handles the job. Here's both paths.

Browser Method — Works on Any Linux Distro, Zero Install

Open Chrome, Chromium, or Firefox and navigate to wildandfreetools.com/pdf-tools/merge-pdf/. The tool runs exactly the same as on Windows or Mac:

  1. Drag PDF files from your file manager into the upload zone, or click to select
  2. Arrange the file order if needed
  3. Click Merge & Download
  4. File downloads to your ~/Downloads directory

The browser merger processes files in-browser with no upload. It doesn't require root, doesn't need additional packages, and works on Ubuntu, Fedora, Debian, Arch, and any other distro with a modern browser.

For Linux users who prefer not to install GUI applications but occasionally need to merge a handful of PDFs without a terminal command, this is the path of least resistance.

pdftk — The Command-Line Standard for PDF Merging on Linux

pdftk is the most straightforward command-line PDF tool. Install and use:

sudo apt install pdftk-java   # Ubuntu/Debian
sudo dnf install pdftk        # Fedora
brew install pdftk-java       # if using Homebrew on Linux

Then merge:

pdftk file1.pdf file2.pdf file3.pdf cat output merged.pdf

That's it. pdftk streams files from disk rather than loading them into RAM, so it handles PDFs of any size without memory issues. It also does more: split, rotate, encrypt, fill forms, stamp, and more. For scripted/automated PDF workflows on Linux, pdftk is the first tool to reach for.

Sell Custom Apparel — We Handle Printing & Free Shipping

Ghostscript (gs) — Already Installed on Many Linux Systems

Ghostscript is often pre-installed on Linux systems (check with gs --version). It can merge PDFs but the command is verbose:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf

The flags: -dBATCH exits after processing, -dNOPAUSE skips prompts, -q suppresses output, -sDEVICE=pdfwrite sets the output driver.

Ghostscript re-renders PDFs rather than copying page structures, which can occasionally affect output quality for complex PDFs (embedded fonts, transparency). For standard document PDFs it produces clean output. pdftk is generally preferred for pure merge tasks because it preserves the original PDF structure without re-rendering.

pdfunite — Lightweight Alternative from poppler-utils

pdfunite comes from the poppler-utils package, which is commonly installed as a dependency of many Linux applications:

sudo apt install poppler-utils   # Ubuntu/Debian

Then:

pdfunite file1.pdf file2.pdf file3.pdf merged.pdf

Simpler command than ghostscript, and like pdftk it copies page structures without re-rendering. Suitable for straightforward merges. Less feature-rich than pdftk for complex operations.

Which Method to Use on Linux

SituationBest method
Occasional merge, no CLI preferenceBrowser tool (no install)
Regular command-line userpdftk (simplest syntax)
Need to avoid any installBrowser tool or ghostscript if pre-installed
Very large files (1GB+)pdftk or ghostscript (disk-based streaming)
Automated scripted workflowpdftk in bash script
Sensitive documents, no internetpdftk or pdfunite (fully offline)

Linux users tend to prefer the terminal when available. But the browser tool fills the gap when you want to merge a few PDFs quickly without a package install or remembering pdftk's syntax. Both are fully local — no files leave your machine either way.

Merge PDFs on Linux — Browser or Command Line

Works in Chrome and Firefox on any distro. No package install required. Files stay on your machine.

Open Free PDF Merger

Frequently Asked Questions

How do I merge PDF files on Ubuntu without installing software?

Open Chrome or Firefox and go to wildandfreetools.com/pdf-tools/merge-pdf/. The browser tool processes PDFs locally with no upload and requires no additional packages. Alternatively, if ghostscript or poppler-utils is already installed, use: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf

What is the best command-line PDF merger for Linux?

pdftk is the most commonly recommended. Install with: sudo apt install pdftk-java (Ubuntu/Debian). Usage: pdftk file1.pdf file2.pdf cat output merged.pdf. It handles any file size, preserves PDF structure without re-rendering, and has straightforward syntax.

How do I use ghostscript to merge PDFs on Linux?

Run: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf. Ghostscript re-renders PDFs during merge, which can affect quality for complex documents. pdftk is preferred for preserving original PDF structure.

Does the browser PDF merger work on Linux?

Yes. Open wildandfreetools.com/pdf-tools/merge-pdf/ in Chrome, Chromium, or Firefox on any Linux distribution. The tool runs the same as on Windows or Mac — drag files in, click Merge, download. No packages to install beyond your existing browser.

Sarah Mitchell
Sarah Mitchell PDF & Document Specialist

Sarah spent eight years as a paralegal before transitioning to tech writing, covering PDF management and document workflows.

More articles by Sarah →
Launch Your Own Clothing Brand — No Inventory, No Risk