How to automatically use packages at startup?


Is it possible to have the REPL automatically call using PackageName at startup? This seems very useful with 0.7 (using LinearAlgebra), etc.

I tried to find it the Julia docs, maybe the answer could be added to the FAQ under “Sessions and the REPL”.


There is ~/.juliarc.jl, which is executed by default for REPL and non-interactive sessions. You can disable it with the option --startup-file={yes|no} Load ~/.juliarc.jl.

It’s mentioned in a few places in the docs (easy to find if you know that it’s juliarc.jl` …), e.g.:


Thanks! (I remembered there was a file, just couldn’t remember the name.)

This should be made very prominent in preparation for 0.7. (which is almost unusable without it, as if you forget using LinearAlgebra or using Random you have to start the REPL over again.)


What does rc stand for? juliarc seems like a particularly unmemorable name



[An rc file is a ] Script file containing startup instructions for an application program (or an entire operating system), usually a text file containing commands of the sort that might have been invoked manually once the system was running but are to be executed automatically each time the system starts up.

Its etymology is obscure (click the link for details), but it’s a unix convention (for example .bashrc).


I would say it is particularly memorable, looking at other examples:




I may be missing something, but can’t you just load anything later if you need it? Why do you need to restart the REPL?


The namespace gets polluted, so you have to then do Random.rand to call rand


More evidence that we need a unix sans abbreviations. Programming should be easier than playing nethack.


I see, I think this was a blind spot for me given my workflow (doing almost everything in modules, with Revise.jl).


1.0 won’t be as bad as it’ll just error out with UndefVarError. It’s the deprecation message that makes this so painful.

  1. The abbreviation is standard on Unixes. This is the first thing an experienced user would look for.

  2. It is very well documented, both in Getting Started, and in the command line:

$ julia --help | grep juliarc
 --startup-file={yes|no}   Load ~/.juliarc.jl


FYI it’s been moved to ~/.julia/config/startup.jl