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 wrote a very simple function that I would like to act as if it were one of the default functions that came with Mathematica, so that you don't have to load or import any package before you make use of it. The reason is, the function is so simple, that its almost just as easy to just re-write the function as it is to import a file every time. It would be nice though if I just didn't have to do anything.

Is there any way to achieve this behavior?

share|improve this question

marked as duplicate by Sjoerd C. de Vries, Artes, Yves Klett, Oleksandr R., R. M. May 22 '13 at 20:49

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.

$UserBaseDirectory <> "\\Kernel\\init.m" I usually put <<MyPackages` here. – HyperGroups May 22 '13 at 13:10

You could add it to the initialization file. See more in the documentation:

share|improve this answer

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