Here's Linux running inside a PDF, running inside a browser, running on a Windows PC

YouTube YouTube
Watch On

I'm in. I intone the words with a sense of victory as I navigate the file directory using only shell commands—a feat that might have impressed the occasional adolescent maybe two decades ago. But then, the camera pans out to reveal a PDF document… inside a Chrome browser… running on Windows.

Yes, this is Linux running in a PDF, running in a browser, on my Windows PC.

This completely unexpected turn, brought to you by Ading2210, the same high school student who gave you Doom running in a PDF. On YouTube, they go by vk6 (via Hackaday).

In the video description showcasing the LinuxPDF project, they explain: "I got Linux running inside a PDF file via a RISC-V emulator compiled to Javascript."

What a world we're in today: a world of such compute power that means high-level and rather ubiquitous technologies such as Javascript can run entire emulators, apparently inside PDFs. The fact that PDF documents allow Javascript to execute is a double-edged sword, of course, as while it can allow you to run DOOM and now, apparently, Linux, it can also put you at risk of dodgy malware scripts.

LinuxPDF can run in any Chromium-based browser, which includes Chrome (duh), Brave, Edge, and Opera. You can check it out for yourself here.

Of course, you're not getting the Ubuntu experience inside your Chromium-powered PDF, rather you're getting an incredibly barebones command line experience via TinyEMU RISC-V emulation.

And you're not getting a particularly fast version of that, either, thanks to the layers of emulation. You get a command line, plus a virtual keyboard to press—although you can also type your inputs using your own keyboard using the space at the bottom-right. It's a little janky (backspace only seems to register on the virtual keyboard, for instance) but what do you expect?

Ading2210 explains: "It works by using a separate text field for each row of pixels in the screen, whose contents are set to various ASCII characters." Pretty ingenious, if you ask me.

So, first DOOM, and now Linux. What's next? Crysis? How about a PDF reader running from an emulated OS running inside a PDF? We're waiting, Ading.

Best SSD for gamingBest NVMe SSDBest external hard driveBest external SSD

Best SSD for gaming: The best speedy storage today.
Best NVMe SSD: Compact M.2 drives.
Best external hard drive: Huge capacities for less.
Best external SSD: Plug-in storage upgrades.

Jacob Fox
Hardware Writer

Jacob got his hands on a gaming PC for the first time when he was about 12 years old. He swiftly realised the local PC repair store had ripped him off with his build and vowed never to let another soul build his rig again. With this vow, Jacob the hardware junkie was born. Since then, Jacob's led a double-life as part-hardware geek, part-philosophy nerd, first working as a Hardware Writer for PCGamesN in 2020, then working towards a PhD in Philosophy for a few years (result pending a patiently awaited viva exam) while freelancing on the side for sites such as TechRadar, Pocket-lint, and yours truly, PC Gamer. Eventually, he gave up the ruthless mercenary life to join the world's #1 PC Gaming site full-time. It's definitely not an ego thing, he assures us.

Read more
Doom running in a PDF file
Galaxy-brained high schooler ports Doom to a PDF file, paving the way for a bloody revolution in invoicing
Windows 11 Task Manager showing 11 GB RAM use with a sad face drawn on top
A debloating wizard has managed to get Windows 11 running on just 184 MB of RAM, and it looks like it can actually run apps
Various creations in Minecraft, including computers and calculators.
This Minecraft creation blots out the sun for the villagers below, they surely praise it as God, but we know it really to be a functioning 32-bit computer with 2 kB of RAM
A screenshot from a YouTube video of Doom running on an Apple Lightning to HDMI adapter, with a monitor showing an imp on screen.
Doom on a dongle: Turns out the Apple Lightning to HDMI adapter has more than enough grunt to blast imps with aplomb
gotg llama
Blasting AI into the past: Modders get Llama AI working on an old Windows 98 PC
Doom Captcha on a colourful orange and yellow background
Thanks to Doom, I can finally solve captcha prompts without wanting to spoon my eyeballs out and wander into the wilderness
Latest in Operating Systems
Promotional image of the HP Envy Inspire inkjet printer
Haunted printers turning on by themselves and printing nonsense has to be one of my favorite Windows 11 bugs ever
Microsoft Windows 11
The latest Windows 11 dev build gives you the ability to snap together commonly paired apps for access in a single click, and I'm already sold
Windows 11's new emoji button in the taskbar.
You might mock Microsoft's new emoji button in Windows 11 but as someone that's explained how to quickly access emojis and special characters too many times, I get it
Windows 10 operating system logo is displayed on a laptop screen for illustration photo. Gliwice, Poland on January 23, 2022.
Valve's monthly survey reveals that almost 45% of Steam users on PC are still using Windows 10 even with the sword of Damocles hanging over them
A promotional image for Microsoft OneDrive, showing a stylized collage of a tablet, phone, and application icons together
About darn time: Microsoft says it has fixed the annoying lag in Windows Explorer when working with cloud-based files
LinuxPDF, linux running in a PDF document
Here's Linux running inside a PDF, running inside a browser, running on a Windows PC
Latest in News
Dante smiling
'No AI used': Netflix's Devil May Cry showrunner confirms that all of Kevin Conroy's lines were recorded before he passed
Nvidia RTX 5090 Founders Edition graphics card on different backgrounds
AI will be crammed in more of the graphics pipeline as Nvidia and Microsoft are bringing AI shading to a DirectX preview next month
Nvidia RTX 50-series graphics cards alongside an RTX 4090
Nvidia says it's sold twice as many RTX 50-series cards as RTX 40-series in the first 5 weeks. I'd bloody well hope so given there was essentially just the RTX 4090 for competition
AMD Radeon RX 9070/9070 XT graphics cards with artistic renders of reference design cards circled
Looks like a reference design AMD RX 9070 XT card has shown up in China, but let's not get carried away with thoughts of MBA cards just yet
Concept art of WoW's upcoming player housing system, showing a warm homestead with a welcoming figure in shade.
WoW flexes its MMO player housing system in a new blog post, and it really might just beat FF14's dated furniture placement into the dirt
spectre divide
Spectre Divide and its studio are shutting down after just six months: 'The industry is in a tough spot right now'