Environment variable configuration,
View and modify the environment variable PATH in Windows
Right-click "this computer", click "properties", and select "Advanced System settings" on the left, as shown in figure
Select "advanced" and click "environment variables", as shown in
The last part is the current user's environment variable, and the next part is the system environment variable. It applies to all users. Generally, modifying the PATH is to change the system variable.
Click "new" and set the variable name and variable value to create an environment variable. (For example)
Click "edit". On the right of the new window, you can create, edit, browse, and delete variable values. Moving up or down can change the order of variable values. (For example)
Similarly, click "delete" to delete the selected environment variables.
In Linux, view the PATH environment variable.
$ PATH: environment variable, format:
PATH = $ PATH: <PATH 1 >:< PATH 2 >:< PATH 3 >:------: <path n>
Used Between pathsColonAfter the change, it will take effect the next time the user logs in.
To take effect immediately, run the source command.
Command for viewing the PATH value:
$ Export
Command for viewing PATH environment variables:
$ Echo $ PATH
Command to add the PATH environment variable:
$ Export PATH = <PATH >:$ PATH
However, the environment variables added by this method are temporary and will become invalid after the terminal is closed. If you want to save the PATH variable for a long time, you can modify/etc/profile (root permission is required for all users) # vim/etc/profile can also be changed under the home directory. bashrc file (do not have root permission, change for individual users) $ vim ~ /. Bashrc open the document and add the last line: export PATH = "<PATH>: $ PATH" to save and exit. Then run: source/etc/profile or source ~ /. Bashrc environment variable modified