Skip to content

How to Scan QR Codes on Linux

By Codexengr, QR Systems Engineer · Last reviewed

Scanning QR Codes on Linux

Linux distributions ship no built-in QR scanner, but you have two solid options: a web-based scanner in your browser (works everywhere, nothing to install) or a native decoder app from your package manager (works offline).

Method 1: Web-based scanner (recommended)

  1. Open Firefox or Chrome.
  2. Navigate to a web-based QR scanner served over HTTPS.
  3. Allow camera access when the browser asks.
  4. Hold the QR code up to the webcam.

If the browser cannot see the camera, check the site-permission icon in the address bar, close any other app holding the camera (video calls, recording tools), and confirm your user has access to the video device. A quick test in any video-call app tells you whether the OS sees the camera at all.

Method 2: Native decoder app

Several open-source QR decoders are packaged for major distributions. They typically offer both live camera scanning and image-file decoding, and they work offline. Availability varies by distribution — if your package manager does not carry one, Method 1 is the practical answer.

No camera? No problem

Many Linux machines — desktops without webcams, servers, VMs — have no camera hardware. Web scanners with image-upload mode solve this completely: photograph the code with your phone, transfer the file to the Linux machine, and upload it. The decode quality from a phone photo is usually better than from a cheap webcam anyway.

Browser differences

If the scanner works in Chrome but not Firefox (or the reverse), the difference is almost always permission handling or device enumeration. Try the other browser before debugging further, and check per-site permissions in the address bar.

Wi-Fi and other payloads

Linux will not auto-join Wi-Fi from a scanned code. Copy the network name and password from the result into your network manager. URLs and text work immediately — paste or click through as usual.

Command-line users

If you live in the terminal, image decoders with CLI interfaces exist and can be scripted for batch jobs — decoding a folder of QR images into text files, for example. For interactive one-off scans, the browser route remains the simplest.

Where the scanner lives on this device

Built-in scanner: none — no built-in scanner — use a web-based scanner in Firefox/Chrome, or a QR decoder app.

How to reach it: Open Firefox or Chrome, navigate to a web-based QR scanner served over HTTPS, grant camera permission, and hold the code to the webcam. Alternatively install a native QR decoder (e.g. via your package manager) for offline use.

Common failure modes and fixes

Browser cannot see the webcam at all

Why it happens: The user may lack permission to the video device, or another application holds the camera.

Fix: Close other apps using the camera, and ensure your user is in the video group. Test the camera in a video-call app to confirm the OS sees it.

Web scanner works in Chrome but not in Firefox (or vice versa)

Why it happens: Camera permission handling and device enumeration differ between browsers.

Fix: Try the other browser. Also check the site permission icon in the address bar — the denial may be per-site rather than global.

No camera on the machine (headless or desktop without webcam)

Why it happens: Many Linux desktops and servers have no camera hardware.

Fix: Use the image-upload mode of a web scanner: photograph the code with your phone, transfer the file, and upload it. No camera needed.

Native decoder app will not install

Why it happens: The package may not exist in your distribution’s repositories.

Fix: Stick with the web-based scanner — it needs nothing installed and works across distributions.

What this guide covers in testing

  • URL QR codes (webcam)
  • Plain-text QR codes
  • Wi-Fi QR codes (manual entry)
  • QR codes decoded from image files

Performance notes

Linux has no built-in QR scanner, but the web-based route works as well as on any other desktop OS: Firefox or Chrome plus a webcam plus an HTTPS scanner page. Webcam quality varies, so the image-upload fallback (photograph with phone, upload the file) is often the fastest reliable method. Native decoder apps exist for offline use but are optional — the browser covers nearly every case.

Frequently asked questions

Is there a built-in QR scanner on Linux?
No. Use a web-based QR scanner in Firefox or Chrome with your webcam, or install a native open-source decoder from your package manager for offline use.
My Linux desktop has no webcam. How do I scan QR codes?
Photograph the code with your phone, transfer the image to the Linux machine, and upload it to a web-based scanner with image-upload mode. No camera hardware is needed.
The browser cannot access my webcam on Linux. How do I fix it?
Close other applications using the camera, verify the OS sees the camera with a video-call app, and check that your user has permission to the video device. Then allow camera access for the scanner site in the browser.
Can I decode QR codes from the Linux command line?
Yes — open-source image decoders with CLI interfaces exist and can batch-decode folders of QR images. For one-off interactive scans, the browser-based scanner is simpler.