Home Linux is now running inside a PDF because people are amazing

Linux is now running inside a PDF because people are amazing

TLDR

  • A high school programmer managed to run Linux inside a PDF file.
  • The project leverages JavaScript and a modified TinyEMU RISC-V emulator.
  • It works best in Chromium-based browsers like Chrome and Brave.

Just weeks after getting 1993’s Doom running inside a PDF file, ‘ading2210’ has returned by getting an operating system to run inside one. In a new video, the high school programmer has managed to get Linux running, with a demonstration of the terminal and plenty of security warning messages.

It’s obviously not a viable option to run in the day-to-day, but ading2210’s pushing of the PDF is nothing short of fascinating. On his GitHub, he elaborates how he managed to get the software working, which includes leveraging often overlooked features of the PDF file format.

PDFs aren’t just static images and text but can involve video and some interactivity. As Ading points out, PDFs can also harness the power of Javascript, which can then be leveraged to run much more advanced things, like Linux or Doom.

The student points out that “C code can be compiled to run within a PDF”, the basis of Linux. Ading then has it target a compiled “modified version of the TinyEMU RISC-V emulator”, which replaces the original file the PDF would look for.

This creates a virtual machine, which can then be used as you would typically use a Linux terminal. It’s not fully featured and is very slow, but it’s utterly fascinating to poke at.

Incredible PDF mod gets Linux running based on RISC-V

Effectively, the PDF file is emulating Linux through an emulation of the RISC-V architecture. RISC-V has been around for years but is quickly coming into its own recently, with more projects utilizing it. It’s meant to be an open-source alternative to processor architectures like x86 and ARM, which are used by Intel, AMD, and Qualcomm.

Products like the Raspberry Pi Pico 2 microcontroller have launched with a RISC-V chip onboard for additional processing.

The projects are available for anyone to tinker around with and even use, but you’ll need to use a Chromium-based browser. This includes browsers like Chrome, Brave, and Arc. In Firefox, both the Linux and Doom PDF files display visual errors.

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the gambling and blockchain industries for major developments, new product and brand launches, game releases and other newsworthy events. Editors assign relevant stories to in-house staff writers with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Joel Loynds
Tech Journalist

Joel Loynd’s obsession with uncovering bad games and even worse hardware so you don’t have to has led him on this path. Since the age of six, he’s been poking at awful games and oddities from his ever-expanding Steam library. He’s been writing about video games since 2008, writing for sites such as WePC and PC Guide, as well as covering gaming for Scan Computers, More recently Joel was Dexerto’s E-Commerce and Deputy Tech Editor, delving deep into the exploding handheld market and covering the weird and wonderful world of the latest tech.

Get the biggest iGaming headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Gambling News

    Explore the latest in online gambling with our curated updates. We cut through the noise to deliver concise, relevant insights, keeping you informed about the ever-changing world of iGaming and its most important trends.

    In-Depth Strategy Guides

    Elevate your game with tailored strategies for sports betting, table games, slots, and poker. Learn how to maximize bonuses, refine your tactics, and boost your chances to beat the house.

    Unbiased Expert Reviews

    Honest and transparent reviews of sportsbooks, casinos and poker rooms crafted through industry expertise and in-depth analysis. Delve into intricacies, get the best bonus deals, and stay ahead with our trustworthy guides.