Managing PATH environment variable
suggest changeSyntax
- Add path : PATH=$PATH:/new/path
- Add path : PATH=/new/path:$PATH
Parameters
| Parameter | Details |
|---|---|
PATH |
Path environment variable |
Remarks
Bash configuration file:
This file is sourced whenever a new interactive Bash shell is started.
On GNU/Linux it is generally ~/.bashrc. On macOS it is ~/.bash_profile or ~/.profile.
Export:
The PATH variable must be exported once (it is exported by default). Once it is exported it stays exported, and any changes made to it are applied immediately.
Apply changes:
To apply changes to a Bash configuration file, you must reload that file in a terminal (source /path/to/bash_config_file)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents