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
Microsoft Copilot
A rather pleasing Windows 11 update bug automatically uninstalls Copilot and unpins it from the taskbar, which is jolly nice of it
Microsoft's Task Manager in Windows 11
After years of complaints about Windows Task Manager displaying CPU utilization incorrectly, a fix is finally on its way
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
Latest in News
Grand Theft Auto 6 trailer still - woman in the front seat of a car, looking out the back window while holding a wad of cash
The specter of a GTA 6 delay haunts the games industry: 'Some companies are going to tank' if they guess wrong, says analyst
Image for
Warhammer 40,000: Darktide’s getting a new roguelite wave defense mode that sounds a whole lot like a souped-up take on Killing Floor
Battle Brothers
Nearly 2 years after its last update, the excellent Battle Brothers gets 'a bucket load of fixes' and free new content
Western outlaws with masks and guns
'Players don't explore': former Grand Theft Auto 6 and Red Dead Online designer lays out the perils of 'open world fatigue'
Person battling bizarre four-eyed monster with stylish UI elements surrounding them
Persona and Metaphor: ReFantazio's UI designer is open to accessibility options for players who find the stylish menus overstimulating: 'That is something we understand we'll need to work on and provide in the future'
Split Fiction screenshot
Split Fiction is reportedly at the center of a bidding war for its movie rights