Linux Operates as a Minimal System Within Excel Spreadsheet

Mon 5th May, 2025

Linux has long been recognized for its versatility, running on a wide array of devices. Recently, enthusiasts have demonstrated its capability to function as a minimal operating system embedded within Microsoft Excel.

A GitHub project launched last week by a developer known as 'NSG650' contains the source code for 'LinuxInExcel'. Utilizing Microsoft's Visual Studio Community Edition, users can compile the 'fun.dll' library, which serves as the core component necessary to run Linux within Excel.

The project employs a small RISC-V emulator called 'mini-rv32ima', which is compiled into a DLL library. This library can be integrated and invoked through a VBA macro within Excel, provided that users adjust the macro paths and enable macro execution in the security settings of Excel. However, this approach carries security risks and should ideally be executed on a machine that can be easily reset. During testing, achieving a functional setup proved challenging, even with extensive macro permissions.

In an innovative twist, YouTuber Enderman has developed an advanced version of the original project, allowing not only for output display in Excel but also for command-line inputs directly within a spreadsheet cell. This enhanced version was successfully operational after adjusting paths in the macro. Enderman claims that invoking the 'vim' text editor is possible; however, due to limitations in relaying the Escape key, text editing is not feasible. Additionally, control keys cannot be utilized as they redirect users to different cells within the Excel interface.

Technically, this solution functions as a minimalist emulator that initiates a RISC-V Linux kernel with a shell, using the Excel spreadsheet as its primary interface. In a video tutorial, Enderman elucidates various techniques to manage input and output through polling methods.

In February, a separate project was revealed that managed to run Linux within a PDF document. This project also utilized a RISC-V emulator, but it operated within a WebAssembly framework, making it suitable for PDF environments. While the PDF display was somewhat coarse, it was functional for input through a virtual keyboard. In contrast, the native-compiled library used in 'LinuxInExcel' showcases significantly better performance compared to the WebAssembly emulation.


More Quick Read Articles »