Close Notebook and Exit

Q: How can I save a notebook, quit the kernel, and close the notebook, using kernel or front-end commands in the notebook, with no keyboard input?

Dick Zacher ( answers: Use the code


The front end sends the entire expression to the kernel before evaluation; once it is sent to the kernel, there is no more need for the notebook, and the [Graphics:inoutbgr70.gif] is executed.