Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Italian Competition Authority investigating Activision Blizzard over Diablo Immortal and Call of Duty Mobile monetisation

    Shovelware is a bigger problem than ever – platform holders need a robust response | Opinion

    Valve says Steam Machine will have “fewer constraints” than Steam Deck for game verification

    Facebook X (Twitter) Instagram
    • Artificial Intelligence
    • Business Technology
    • Cryptocurrency
    • Gadgets
    • Gaming
    • Health
    • Software and Apps
    • Technology
    Facebook X (Twitter) Instagram Pinterest Vimeo
    Tech AI Verse
    • Home
    • Artificial Intelligence

      Ashley St. Clair, the mother of one of Elon Musk’s children, sues xAI over Grok sexual images

      January 17, 2026

      Anthropic joins OpenAI’s push into health care with new Claude tools

      January 12, 2026

      The mother of one of Elon Musk’s children says his AI bot won’t stop creating sexualized images of her

      January 7, 2026

      A new pope, political shake-ups and celebs in space: The 2025-in-review news quiz

      December 31, 2025

      AI has become the norm for students. Teachers are playing catch-up.

      December 23, 2025
    • Business

      New VoidLink malware framework targets Linux cloud servers

      January 14, 2026

      Nvidia Rubin’s rack-scale encryption signals a turning point for enterprise AI security

      January 13, 2026

      How KPMG is redefining the future of SAP consulting on a global scale

      January 10, 2026

      Top 10 cloud computing stories of 2025

      December 22, 2025

      Saudia Arabia’s STC commits to five-year network upgrade programme with Ericsson

      December 18, 2025
    • Crypto

      Trump Shifts on Fed Pick as Hassett Odds Fade: Who Will Replace Powell?

      January 17, 2026

      A Third of French Crypto Firms Still Unlicensed Under MiCA as Deadline Nears

      January 17, 2026

      DOJ Charges Venezuelan National in $1 Billion Crypto Laundering Scheme

      January 17, 2026

      One of Wall Street’s Top Strategists No Longer Trusts Bitcoin | US Crypto News

      January 17, 2026

      3 Altcoins To Watch This Weekend | January 17 – 18

      January 17, 2026
    • Technology

      X is fully online after going down for most of the morning

      January 17, 2026

      Google is appealing the ruling from its search antitrust case to avoid sharing data with rivals

      January 17, 2026

      Get up to 78 percent off ExpressVPN two-year plans

      January 17, 2026

      CyberGhost VPN review: Despite its flaws, the value is hard to beat

      January 17, 2026

      Mayor of London Sadiq Khan calls for urgent action to boost the capital’s AI workforce

      January 17, 2026
    • Others
      • Gadgets
      • Gaming
      • Health
      • Software and Apps
    Check BMI
    Tech AI Verse
    You are at:Home»Technology»Ultimate-Linux: Userspace for Linux in Pure JavaScript
    Technology

    Ultimate-Linux: Userspace for Linux in Pure JavaScript

    TechAiVerseBy TechAiVerseDecember 26, 2025No Comments4 Mins Read2 Views
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr Email Reddit
    Ultimate-Linux: Userspace for Linux in Pure JavaScript
    Share
    Facebook Twitter LinkedIn Pinterest WhatsApp Email

    Ultimate-Linux: Userspace for Linux in Pure JavaScript

    Ultimate Linux!!!

    This is a fun tiny project for building a tiny Linux distribution in just JavaScript (and a tiny bit of C to enable mounting to get some fun results).

    --- ULTIMATE LINUX SHELL ---
    Commands: ls, cd, cat, mkdir, mount, exit
    

    Background context

    I post a lot on X (Twitter) and if you don’t follow me already, please follow now!

    Lately I’ve been posting a lot about Unix, Linux, ideas of kernel syscall stability, etc.

    In particular, I explored lately how Linux is more or less unique in the kernel/OS world for multiple reasons. First, it’s a rare kernel that is shipped independently from the rest of the OS. BSDs, for example, ship the kernel in a coherent unit with the foundational userspace. Linux thus has a unique problem of defining its contract with software built on top of it. And Linux chose stable syscall ABI as this contract. This is in contrast with something like macOS, which is a Unix-certified OS, but which exposes only its system library as the public contract. Apple doesn’t guarantee binary backwards compatibility.

    Then I explored how pure Go binaries can interestingly target the kernel itself directly via syscalls for its static binaries, and not depend on the system libraries, at least on Linux. There were some explorations around u-root project, etc.

    Every once in a while I get comments about how wrong I am when talking about C, Go, Rust, you name it. Comments like Go sucks because it does what it does, I’m wrong when I say “Linux is a kernel, not a complete OS”, I don’t understand Unix, POSIX, whatever you can think of.

    So this time I’m doing something to get all their love. I’m creating a libc-less micro Linux distribution in… JavaScript! A standalone JavaScript binary no less! Of course, there’s a transpilation step through C, but who cares — this is the Ultimate Linux! 💪🐧

    Anyway, putting the jokes aside, if you want to really understand what is going on here and you want to understand the fundamentals of how the Linux kernel interfaces with user software, please check out this article that I have previously written. It’s about making these “micro Linux distros” and it should give you fundamental understanding of what Linux distros really are.

    Build instructions

    Download quickjs source code:

    wget https://bellard.org/quickjs/quickjs-2025-09-13-2.tar.xz
    

    Unpack it:

    tar -xf quickjs-2025-09-13-2.tar.xz
    

    Go inside the source directory, run make and go back up.

    Now go ahead and install musl libc on your system: https://musl.libc.org/

    Do not worry, musl installation is polite by default, meaning it will install itself into /usr/lib/local, it will not clash with your host’s libc. The reason why we install musl is because it provides gcc and clang wrapper scripts for linking against musl instead of your system library. You can then use

    /usr/local/musl/bin/musl-gcc
    

    instead of your system’s GCC to link against the freshly built musl instead of your host system. That’s what we do here and we link statically against musl to make a standalone ELF file which doesn’t depend on the running system’s libc.

    We’re now ready to transpile the JavaScript code to C, link it together with some system operations and produce the final ULTIMATE SHELL!

    ./quickjs-2025-09-13/qjsc -M sys_ops,js_init_module_sys_ops -e -o ultimate_shell.c ultimate_shell.js && /usr/local/musl/bin/musl-gcc -static -o ultimate_shell ultimate_shell.c sys_ops.c -I ./quickjs-2025-09-13 ./quickjs-2025-09-13/libquickjs.a -lm -ldl -lpthread
    

    You can run ./ultimate_shell on your build machine as well, it should be fully portable.

    However, let’s run it on a VM! First, let’s build initramfs.

    image.cpio”>

    echo "ultimate_shell" | cpio -o -H newc > image.cpio
    

    Now let’s run the VM with the Ultimate Shell as the PID 1!

    qemu-system-x86_64 -m 4G -kernel /tmp/linux/linux-6.17.12/arch/x86/boot/bzImage -initrd ./image.cpio -nographic --enable-kvm -smp 8 -append "console=ttyS0 rdinit=/ultimate_shell"
    

    After a long blob of text from QEMU, you should get the shell prompt and you can play around a bit:

    Share. Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Telegram Email
    Previous ArticleMiniMax M2.1: Built for Real-World Complex Tasks, Multi-Language Programming
    Next Article TurboDiffusion: 100–200× Acceleration for Video Diffusion Models
    TechAiVerse
    • Website

    Jonathan is a tech enthusiast and the mind behind Tech AI Verse. With a passion for artificial intelligence, consumer tech, and emerging innovations, he deliver clear, insightful content to keep readers informed. From cutting-edge gadgets to AI advancements and cryptocurrency trends, Jonathan breaks down complex topics to make technology accessible to all.

    Related Posts

    X is fully online after going down for most of the morning

    January 17, 2026

    Google is appealing the ruling from its search antitrust case to avoid sharing data with rivals

    January 17, 2026

    Get up to 78 percent off ExpressVPN two-year plans

    January 17, 2026
    Leave A Reply Cancel Reply

    Top Posts

    Ping, You’ve Got Whale: AI detection system alerts ships of whales in their path

    April 22, 2025617 Views

    Lumo vs. Duck AI: Which AI is Better for Your Privacy?

    July 31, 2025234 Views

    6.7 Cummins Lifter Failure: What Years Are Affected (And Possible Fixes)

    April 14, 2025135 Views

    6 Best MagSafe Phone Grips (2025), Tested and Reviewed

    April 6, 2025109 Views
    Don't Miss
    Gaming January 17, 2026

    Italian Competition Authority investigating Activision Blizzard over Diablo Immortal and Call of Duty Mobile monetisation

    Italian Competition Authority investigating Activision Blizzard over Diablo Immortal and Call of Duty Mobile monetisation…

    Shovelware is a bigger problem than ever – platform holders need a robust response | Opinion

    Valve says Steam Machine will have “fewer constraints” than Steam Deck for game verification

    Amazon Games’ New World: Aeternum to go offline in January 2027

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    About Us
    About Us

    Welcome to Tech AI Verse, your go-to destination for everything technology! We bring you the latest news, trends, and insights from the ever-evolving world of tech. Our coverage spans across global technology industry updates, artificial intelligence advancements, machine learning ethics, and automation innovations. Stay connected with us as we explore the limitless possibilities of technology!

    Facebook X (Twitter) Pinterest YouTube WhatsApp
    Our Picks

    Italian Competition Authority investigating Activision Blizzard over Diablo Immortal and Call of Duty Mobile monetisation

    January 17, 20261 Views

    Shovelware is a bigger problem than ever – platform holders need a robust response | Opinion

    January 17, 20261 Views

    Valve says Steam Machine will have “fewer constraints” than Steam Deck for game verification

    January 17, 20261 Views
    Most Popular

    A Team of Female Founders Is Launching Cloud Security Tech That Could Overhaul AI Protection

    March 12, 20250 Views

    Senua’s Saga: Hellblade 2 leads BAFTA Game Awards 2025 nominations

    March 12, 20250 Views

    7 Best Kids Bikes (2025): Mountain, Balance, Pedal, Coaster

    March 13, 20250 Views
    © 2026 TechAiVerse. Designed by Divya Tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions

    Type above and press Enter to search. Press Esc to cancel.