Your Path
(…in plain words. Possibly technically incorrect).
- Your path is a list of folders that contain programs.
- This list is separated by colons - thing:thing:thing:thing
- For example: /some-programs:/some-other-programs
- When you run a program, the computer searches through this list to find the program.
- It is written in capitals: PATH
- See your path by
echo $PATH
- Add
newfolder
to the end of your path by export PATH="$PATH:/newfolder
- Add
newfolder
to the start of your path by export PATH="/newfolder:$PATH
- Confusingly, the PATH variable can be stored in several places: potentially in a file called ~/.bash_profile, ~/.bashrc, or ~/.profile.
- The value of the PATH can differ according to which environment you are in and which profile is being used.