I have maybe a strange question: is there a way to embed something like the Linux command line in an application? Specifically I'm imagining hacking games like Uplink where there's a command prompt in-game that you interact with. They're sometimes done well but often not, since writing a command line interpreter is a lot of work on top of making a game. If there was a way to leverage actual command line tools that would both cut out a lot of work for the developer and also help with immersion (it's a Unix system, I know this!).
It would need to be something like a sandboxed virtual machine, since you wouldn't want it to interact with the real host machine, just a fake in-universe computer. But it'd still be nice to support things like bash.rc, piping commands, foreground and background tasks, and keyboard shortcuts.
I'm imagining something like how Lua embeds in C, where you'd get callbacks in the host application when the virtual linux machine wanted to interact with the console, read/write files or start up threads.
But I don't know if anything like this exists, or even can exist without more effort than it'd be worth? I'm not even sure exactly what terms to google to start researching this.