Tag Archives: javascript

Linux on JavaScript: new horizons in interactive content

busybox in browser

Linux-in-Javascript emulators are very interesting to me. These are stripped-down Linux systems (usually running busybox) running atop a virtual CPU whose emulation engine is written in JavaScript.

It started with the groundbreaking JavaScript PC Emulator by Fabrice Bellard in 2011. His project emulates a 486 processor. Follow that link to see Linux boot right in your browser. It even comes with gcc to compile programs! The first time you boot up it’s pretty slow, but caching by your browser will result in better performance on subsequent boots.

Check out busybox’s own version of Bellard’s emulator with a fully tricked-out busybox executable.

Today I discovered the JOR1K Emulator which uses the OpenRISC 1000 emulator and includes network and graphics frame buffer support. All things considered, it’s very fast, even on an iPhone. Be sure to run the demo.

These emulators would be a great way to introduce novice students to the command line without needing to set up an account on a real Linux system in advance. They could be embedded directly into educational content–picture an online textbook where the student could try commands in the safety of an emulator. With a suitable suspend/resume feature, we could forego the whole “boot” process entirely and simply jump into a working shell.

As I bring more of my classroom content online (the “flipped classroom” model), it has to be more than just “read this chapter” or “watch these videos.” Interactive content is the way to keep students motivated and engaged. Projects like these really get me thinking about the possibilities.