Hi, I’m trying to get SCALE to work but I’m so confused by what they mean by PATH and I’m stuck.
https://github.com/spectral-compute/scale-docs/blob/master/docs/manual/how-to-use.md
I’m at the CMAKE step.
This is the official guide I’m following. I do understand what they mean by SCALE_PATH though as that is clearly explained but PATH is just very vague to me or I’m just misunderstanding it completely.
Explaining like you are 5:
If you have worked with programming languages, you might have come across global variables and inbuilt functions/keywords.
PATH
is a similar global variable for your terminal session.Every time you open up a terminal, you load up these “global variables”, and you/programs can access them (or the applications assigned to them).
So, let’s say you have your application (executable) as
/home/werecat/corncob/bin/corn
, instead of starting it with./home/werecat/corncob/bin/corn ...
, if you have/home/werecat/corncob/bin
in yourPATH
variable, you can just use it ascorn ...
.export PATH="/home/werecat/corncob/bin:$PATH"
just means:
PATH = /home/werecat/corncob/bin + PATH
If you see somewhere to add it to your
/home/werecat/.bashrc
file, it means “all commands in .bashrc file are auto-executed every time you start a new terminal session, so if you have it there, you won’t need to manually keep entering the command over and over again”.You can list these environment variables by just running:
env
Also, recommend you have a look at https://www.freecodecamp.org/news/how-to-set-an-environment-variable-in-linux/.
Hope this helps. Good luck on your Linux journey.