Share your repls and programming experiences

← Back to all posts
Bash emulator!
ironblockhd

This is a javascript bash emulator i spent many hours on. Features include:

  • a working file system
  • ">"-redirect operator
  • "|" pipe operator
  • nano editor
    Additionally there's many commands:
  • base64
  • cat
  • cd
  • clear
  • cp
  • curl
  • echo
  • grep
  • history
  • ip
  • javascript
  • ls
  • mkdir
  • mv
  • nano
  • pwd
  • rm
  • shutdown
  • sleep
  • touch`
    "Real" linux:

Javascript linux:

Let me know if there's something i should add

Voters
SumedhJannyavul
ironblockhd
Comments
hotnewtop
PattanAhmed

Why is a command called python3 not working?

ironblockhd

@PattanAhmed i didn't implement it lol

PattanAhmed

@ironblockhd LoL!
That's what I love in Linux Terminal dude.

ironblockhd

@PattanAhmed me too, i wanted to implement it but i would need a way to execute python in the browser

ironblockhd

@PattanAhmed it's not an actual terminal like on replit, i tried to make a clone in javascript

PattanAhmed

@ironblockhd Oh I got it!

PattanAhmed

@ironblockhd That would be a great feature if added.

CodeLongAndPros

This is a “Linux” emulator, the only shell built is are stuff like source, alias, echo, cd…

ironblockhd

@CodeLongAndPros it does not include a kernel, thus i would consider it a bash emulator with additional commands. In fact, you can use alternative shells such as "dash" on linux.

CodeLongAndPros

@ironblockhd Yes, I know. But you are implementing POSIX binaries and calling it bash. And I use Zsh, so I know perfectly well how to use /etc/passwd.