How to avoid any time setting of source before runnning example?

I don’t want set in terminal any time when run some file value of source to:

source ~/Documents/GEANT4/geant4-v11.0.2-install/bin/

Is there any way to set it once somewhere for all time calculations ?

Assuming this is a macOS system and the Zsh shell is being used, that line can be added to ~/.zshrc or ~/.zprofile (~/.bashrc or ~/.profile for Bash shell). It’ll then be sourced on each new login or session.

Can I add that line rverywhere in .bashrc file or I should do it somwhere concretely ?

Sorry, I’m not sure what you mean - it only needs adding once in one file, so if you are using Bash, then simply paste it once in .bashrc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.