Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In OSX there is a hidden utility called jsc, part of WebKit, that can be used to run JavaScript code on the command line. It can be used as a JavaScript console, like irb for Ruby.

I have the libwebkitgtk-3.0 and -3.0-dev libraries installed, but I cannot figure out how to find or build jsc. Is it even possible?

Note: I already know about alternatives like Rhino, SpiderMonkey, etc.

share|improve this question
up vote 8 down vote accepted

Install a link to install rhino and use rhino-jsc (see manpage)

share|improve this answer

Another solution is to install nodejs:

sudo apt-get install nodejs npm

The above will not always install the most recent version, in which case you can try:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
share|improve this answer

If you prefer to avoid Rhino and stick with the WebKitGTK+ packages, install a link to install libjavascriptcoregtk-3.0-bin and use /usr/bin/jsc (manpage)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.