How to Add Environment Variable in Linux Permanently
If you want to know how to add environment variable in linux permanently, the short answer is to place the variable in the correct startup file for your shell, such as ~/.bashrc, ~/.zshrc, or ~/.profile, or set it system-wide in /etc/environment. The right file depends on whether you want the variable for just one user…
