environment variable configuration under Mac

Source: Internet
Author: User
Common environment variable configuration file under Mac

1./etc/profile (it is not recommended to modify this file)

A global (public) configuration that reads the file when logged on, regardless of the user.

2./ETC/BASHRC (typically add system-level environment variables to this file)

Global (public) configuration, which will be read by the bash shell, regardless of the way it is executed.

3.~/.bash_profile (typically add user-level environment variables to this file)

(Note: Linux is. BASHRC and Mac is. Bash_profile)

This file will not be read until the bash shell is executed in login mode.

Make the environment variable effective when modified:

After you modify the environment variables, you need to restart or log back in to reload the environment variables to take effect.

If you want to take effect immediately, you can execute the following statement (with a. bash_profile example):

source. bash_profile

Or

. . bash_profile

This is also done on Linux.

environment variable configuration under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.