How can different versions of julia in juliaup share a same `startup.jl` file?

How can different versions of julia in juliaup share a same startup.jl file?

For example, I have installed julia v1.11.2 and v1.10.7 in juliaup and they both appears in the JULIAUP_DEPOT_PATH, but the startup.jl files are located in their own directories. I want them share a same startup.jl file, what should I do?

In unix, linux and MacOS

You can use symbolic link to point to a single startup.jl file.

What about windows?

You should really only ever modify/use ~/.julia/config/startup.jl, and that will be used by all Julia versions that use this depot.

The startup.jl files that are inside the ~/.julia/juliaup folders shouldn’t be edited by users (I kind of wish they didn’t even exist in the distributions of Julia).

4 Likes

Thanks for your reply, @davidanthoff ! :handshake:

BTW, may I ask you the necessary configuration for the installation of portable juliaup and julia? After unziping the juliaup package to a place, for example, a USB drive F:\, I need to add F:\juliaup to the Path environment variable and at the same time to create a new environment variable named JULIAUP_DEPOT_PATH and set its value to point to someplace in F:\. Am I right? Is this all I need to do? How should I change the default path of the folder ~\.julia to the USB drive? Do I have to repeat these configurations every time I insert the USB drive into a new computer? I wonder whether there is any method that we can configure these within the portable juliaup and julia?

Waiting for your attention and thank you in advance!