First of all, the modification of environment variables in the cmd command line is valid for the current window of the detachment, that is to say, the modification of this window will be invalid.
Environment variables are mainly used to specify some parameters of the running environment
Use the same command set to view, modify, add, and delete environment variables in cmd
View: set to view all environment variables, set variable name to view the variable
Modification: set variable name = value, the modification here is to overwrite rather than append, if you want to append, you can write set variable name = % variable name%; new value
delete: set variablename=
Add: equal to modify