I use the Julia programming language on a Chromebook with only 32 GB internal storage.
The .julia
directory in the home folder consumes several gigabytes of space. This directory contains all the julia packages (similar to python libraries), and it is essential for Julia to use those packages.
I have a microSD card with a lot of free space. How do I move the .julia
directory to the microSD card?
I am using Kubuntu 23.04.
First, create ext4 partition in the microSD card (if you already didn't), and configure the partition to be mounted automatically at startup. Ensure that you have write access to the ext4 partition (without requiring
sudo
).For me, that partition is mounted at
/mnt/SDCard/
.Now, create a directory
julia_dir
in that partition.Now, there are two options. Adding an environment variable, or symlinking (you can use either depending on your choice).
Method 1
Move the contents of
.julia
to SDCard, and set the environment variableJULIA_DEPOT_PATH=/mnt/SDCard/julia_dir
Method 2
Move the contents of
.julia
to SDCard, and symlink.Afterwards, Julia would use
/mnt/SDCard/julia_dir/
in the microSD card to store and access its packages.