Choose the appropriate version for your operating system (Windows, macOS, or Linux).
Download the "portable" version, which typically comes as a tarball (.tar.gz) for macOS/Linux or a zip file for Windows.
Step 2: Extract Julia to your pen drive
Insert your pen drive into your computer.
Extract the downloaded file directly onto your pen drive. For Windows, you can use a program like 7-Zip or the built-in Windows extractor. For macOS or Linux, you can use the tar command in the terminal or a graphical archive manager.
For Windows:
Right-click the downloaded .zip file and choose "Extract All..." or use a third-party tool like 7-Zip to extract the contents.
Choose your pen drive as the destination for the extracted files.
For macOS/Linux:
Open a terminal.
Change directory to where your downloaded file is located using cd /path/to/downloaded/file.
Extract the tarball using tar -xvzf julia-x.y.z-linux-x86_64.tar.gz -C /path/to/pen/drive. Replace x.y.z with the version number of Julia you downloaded, and replace /path/to/pen/drive with the actual path to your pen drive.
Step 3: Set up environment (optional)
If you want to run Julia from the command line without specifying the full path to the executable every time, you'll need to add it to your system's PATH environment variable:
For Windows:
You can do this temporarily in Command Prompt with:
shell
set PATH=%PATH%;E:\path\to\julia\bin
Replace E:\path\to\julia\bin with the actual path to the bin folder inside the Julia directory on your pen drive.
To make it permanent, you'll need to add it via the System Properties -> Environment Variables, but this will only affect the computer you're currently using, not the portability of Julia on the pen drive.
For macOS/Linux:
You can add the path temporarily in the terminal with:
shell
export PATH=$PATH:/path/to/pen/drive/julia/bin
Replace /path/to/pen/drive/julia/bin with the actual path.
To make the change permanent for your user, add the export command to your shell's profile file (like ~/.bash_profile for bash or ~/.zshrc for zsh).
Remember, making the PATH change permanent will only affect the computer you're currently using, not the portability of Julia on the pen drive. Each new machine you use will require you to add Julia to the PATH if you want to avoid typing the full path to the Julia executable.
That's it! You should now have a portable version of Julia installed on your pen drive. You can use it on any computer by inserting the pen drive and running Julia from the command line or by navigating to the Julia folder on the pen drive and running the executable directly.