-3

How can I execute a Linux shell command or script, using javaScript, html(execute button), node.js and firefox browser on Linux OS?

user3687374
  • 45
  • 1
  • 6
  • 1
    Possible duplicate of [How to execute shell command in Javascript](http://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-javascript) – airos Mar 10 '17 at 13:02

1 Answers1

3

Your HTML page would have to send a request to your Node.js program, either using an HTML form submission or an AJAX request or WebSocket and your Node.js program would have to run the script or command using the child_process module.

See: https://nodejs.org/api/child_process.html

rsp
  • 107,747
  • 29
  • 201
  • 177