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.
cd /mnt/SDCard
mkdir julia_dir
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 variable JULIA_DEPOT_PATH=/mnt/SDCard/julia_dir
mv ~/.julia /mnt/SDCard/julia_dir
echo 'export JULIA_DEPOT_PATH=/mnt/SDCard/julia_dir' >> ~/.bashrc
source .bashrc
Method 2
Move the contents of .julia
to SDCard, and symlink.
mv ~/.julia /mnt/SDCard/julia_dir
ln -s /mnt/SDCard/julia_dir/ /home/your-username/.julia
Afterwards, Julia would use /mnt/SDCard/julia_dir/
in the microSD card to store and access its packages.
.config
,.cache
, or.mozilla
. – Archisman Panigrahi Aug 27 '23 at 14:16