Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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

This question already has an answer here:

I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into initialization cells. However, I notice that the initialization cell isn't run on start up unless I evaluate it using Shift + Enter or Command + Enter.

Is it not an initialization cell that I am looking for?

Steps I took to make my cell an initialization cell:

  1. Selected the cell with mouse click
  2. Cell > Cell properties > Initialization cell


I just added InitializationCellEvaluation -> True as the first line of my file. However, how should I make this evaluatable?

share|improve this question

marked as duplicate by Mr.Wizard Aug 6 '13 at 6:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Move your edits into an answer, so that others can use it, too. – rcollyer Aug 15 '12 at 21:59
@rcollyer I felt a little odd about answering my own question! – drN Aug 15 '12 at 22:03
Its expressly encouraged. You might as well get the points for it. – rcollyer Aug 15 '12 at 22:35
@rcollyer Thanks mate! :) – drN Aug 15 '12 at 22:37
up vote 12 down vote accepted

I think I found it but I'd be more than happy to look at other alternatives if any provided:

  1. Shift + Ctrl + O to open Options > Notebook options > Evaluation options > Global preferences from the drop down menu at the top

  2. Change InitializationCellEvaluation to True and InitializationCellWarning to False

The next time the .nb file is launched, the initialization cell is run.

share|improve this answer
Does it work to set it only for a specific notebook and leave preferences untouched? – Vitaliy Kaurov Aug 15 '12 at 23:03
@VitaliyKaurov It does but I changed it at the global level. – drN Aug 15 '12 at 23:16

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