User environment variable invalidation after using zsh instead

Source: Internet
Author: User

Novice OSX user, colleague said unable to spit slot my Whiteboard terminal, to me recommended Zsh+iterm combination (of course, oh-my-zsh), terminal instantly tall on. It's a lot of fun to use, but it's a little bit of a problem for me, and that's when the environment variable I configured before is restarted. I write my environment variables in the ~/.bash_profile, according to the truth every time the system will automatically go to execute this file, but did not execute, do not have to manually source a bit. As a small white, very puzzled, hurriedly to check the reason.

The answer is to switch to zsh, and do not execute the ~/.bashprofile file, and is not a simple overwrite, after all, I have not only changed the path, but also added the environment variables, if only overwrite the words can not echo my custom environment variables.

Workaround others also give, after switching to zsh after the system will execute ~/.ZSHRC, only need to add the source ~/.bash_profile this line to. ZSHRC inside to get it done.

User environment variable invalidation after using zsh instead

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.