Mac plus environment variables

In fact, like windows, adding environment variables to the advanced properties is to find the command when you enter a command in any path, so you don't have to enter the file where the command is located every time you want to enter a command (such as logging in to mysql). Clip (usually quite long).

The following is to add the path of the mysql command to the environment variable:

 

1. Open the terminal and enter: cd ~

will enter the ~ folder

2. Then enter: touch .bash_profile

After the carriage return is executed,

3. Enter again: open -e .bash_profile

will open the file in TextEdit (if no environment variables have been configured before, this should be a blank document). If there is content, please enter it before the terminator, if there is no content, please enter it directly

export PATH=${PATH}:path

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325298535&siteId=291194637