Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry but what I think you've done is just emulating a shell, not an actual Linux system. For that, you need to emulate some architecture that Linux supports, like x86/RISC-V/ARM. With that you should be able to boot a real Linux kernel.

One guy even made a RISC-V emulator inside VRChat using a shader[1]. Doing it in JavaScript will probably be easier, and I wouldn't be surprised if someone has done that already.

Until you emulate a CPU architecture and boot an actual Linux kernel, it isn't quite fair IMO to call it "Linux".

[1] https://blog.pimaker.at/texts/rvc1/



Fabrice Bellard has JSLinux to boot actual Linux in a web browser: https://bellard.org/jslinux/

Cool stuff


Well, there is technically no such thing as an "actual Linux system." There are mainly GNU/Linux systems. If one is using the word "Linux" from a high-level systems theoretical perspective, the they are speaking about a certain philosophy related to how they approach the question of performing general computations. So, it is from the "Unix philosophical" point of view that I use the word "Linux." This also seems to be the generally accepted way of using that word, because most people use it as a shorthand for something with much more cultural significance (i.e. the open source alternative to the Windows or Mac ecosystems) than the kinds of technical facts to which you are referring.


> There are mainly GNU/Linux systems

And yours contains neither GNU nor Linux, or as I’ve taken to calling it -(GNU+Linux).

It would be one thing if you had implemented a binary compatibility layer similar to WSL1, but what you’ve created seems to be a POSIX-like environment on the web.


At the most basic level, Linux means "Linux kernel", which you clearly don't have here. You can't run ELF files, you can't create processes, you can't load kernel modules, in fact the only things you can do are those that you directly emulated in JavaScript, which is a very different experience than interacting with a real Linux distro.

Your project has none of the capabilities that are very much expected when someone mentions "Linux", even in a broader sense.

In fact, I'm pretty sure your shell doesn't have some most basic abilities that a POSIX shell has (as another comment mentioned). See the manual page of e.g. dash shell and see what I'm talking about.

Emulating a shell can be fun, but it's clearly not the same as running an operating system. You should probably clarify that in the project README to avoid misinformation. Because otherwise, your project claims to be what it's obviously not.


Well, although I certainly can get enjoyment through never-ending hours of coding, I am mainly doing this project to get something to actually work.

I would tend to look at this project as an implementation rather than an emulation.

The current implementation of the shell is certainly in a highly bare bones state, but that can definitely change over time if that is in fact where the development process leads. If it gets to the point of being able to quack like a POSIX shell, then who's to say that it isn't really one?


If you are genuinely interested in creating a working shell, take a look at POSIX shell specification[1] and list of and functionality of command-line utilities[2].

If you implement most of it then you would be able to call your project a POSIX shell.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

[2] https://pubs.opengroup.org/onlinepubs/9699919799/idx/utiliti...


Why not just call your system Unix on the web, if it is more borrowing from the Unix philosophy?

I don’t know what the Linux philosophy is. I think it is the kernel of choice for GNU based systems because it existed and was open enough to use, while Hurd was more philosophical (to the point where, when it was needed, it existed more as an idea than a thing).

Linux is where it is because they make pragmatic decisions when when necessary.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: