Notebookcheck Logo

High-schooler creates LinuxPDF: Running Linux on a RISC-V emulator inside a PDF file

Console screenshot of LinuxPDF executing the 'ls' command while running Linux within a PDF file. (Image source: Ading2210 on Github)
Console screenshot of LinuxPDF executing the 'ls' command while running Linux within a PDF file. (Image source: Ading2210 on Github)
Ading2210, a high-schooler who created DoomPDF, has now released LinuxPDF to run Linux on a RISC-V emulator derived from TinyEMU within a PDF file using a combination of C, Python, HTML, and Javascript.

A high-schooler who goes by the online handle of ading2210 has released LinuxPDF, software that runs Linux within a PDF file. This comes after his earlier release of DoomPDF, software that runs the video game Doom within a PDF file. The demonstration version of LinuxPDF can be accessed using a Chromium-based web browser here.

Web browsers use HTML, CSS, and Javascript to create the interactive web pages we see across the Internet today. A subset of those languages are available in modern PDF browsers to execute code.

TinyEMU is a small RISC-V system emulator running Linux, and the uncompiled TinyEMU code with Linux OS can be downloaded in a 15 MB file. This is small enough to be run within a PDF browser without much difficulty, especially when viewing that PDF file within a web browser as linked above.

But operating systems like Linux are coded in C, a language that is not natively supported by web or PDF browsers. Emscripten, a cross-compiler tool, was used to convert C code into a subset of Javascript called asm.js that can run in PDF files.

Limitations in modern PDF browsers further limit what Javascript code can be run. Ading2210 overcame these in his earlier release of DoomPDF, especially for the input of text and output of the system display, and reused such code in LinuxPDF.

static version load dynamic
Loading Comments
Comment on this article
Please share our article, every link counts!
Mail Logo
> Expert Reviews and News on Laptops, Smartphones and Tech Innovations > News > News Archive > Newsarchive 2025 02 > High-schooler creates LinuxPDF: Running Linux on a RISC-V emulator inside a PDF file
David Chien, 2025-02-18 (Update: 2025-02-18)