title: The code that runs when you type `node` at the terminal
body: <p>I am trying to learn how the shebang works, and wondering what happens when you type <code>node</code> at the terminal prompt. Wondering if it calls <code>main</code> in one of the <a href="https://github.com/nodejs/node/tree/a4ce449bb7b0e2f9edba75baf2a2f652a6750454/src" rel="nofollow noreferrer">c functions</a> somewhere. I understand only the basics, having been using node for a while. The shebang <code>#!/usr/bin/env node</code> somehow reads the node executable, which I'm not sure what or where it is, and what it starts at. Then there is the code that actually evaluates the expression <code>node</code> and directs it to the shebang, but that's probably too complicated to ask about.</p>