Mac system environment variable settings recently used Apple notebook, downloaded a rar decompression software, is a command line program, must be added to the system environment variables. Search online and add it ~ /. Bash_profile file, but I have read it. I don't have this file on my computer, but there is ~ /. Profile (these files are hidden files, which can be viewed through ls-a) file. Add the Shell code export PATH =/Users/apple/apps/rar to this file: $ PATH is a typical value assignment statement. $ PATH is an existing environment variable string, because each PATH added to the environment variable is separated by a colon, add the path of rar software/Users/apple/apps/rar to the environment variable. Run the echo $ PATH or printenv PATH command to display the following information: Txt code/Users/apple/apps/rar:/opt/local/bin:/opt/local/sbin: /usr/bin:/usr/sbin:/usr/local/bin: /usr/X11/bin: the newly added path is added to the beginning of the environment variable. I have studied the environment variables of the Mac system. The loading sequence is:/etc/profile/etc/paths ~ /. Bash_profile ~ /. Bash_login ~ /. Profile ~ /. Bashrc of course,/etc/profile and/etc/paths are system-level, which will be loaded when the system starts. The following are the environment variables of the current user level. The last three are read in the previous and subsequent order. If ~ /. Bash_profile file exists, then the following files will be ignored and not read. If ~ /. Bash_profile file does not exist, so it reads the following files accordingly .~ /. Bashrc does not have the above rules. It is loaded when bash shell is opened. It is worth mentioning that in these files, the/etc/paths file does not use the export method to add environment variables, the path of each line in its file content will be added to the environment variable. For example, view the content displayed in this file on my computer: cat/etc/paths: txt code/usr/bin/usr/sbin/usr/local/bin. The environment variables are printed on the paths, they are added to this file.