How to successfully solve the MAC command under no circumstances

Source: Internet
Author: User

Background:

Last night, the installation of node through brew, the result of my terminal in addition to the CD and LS, the other commands are not used, the Internet search a lot of results, no one can correctly solve my problem, record it.

Turn on the terminal to display:

-bash:touch:command not found

First of all:

In the terminal input: Export path= "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/x11/bin" This sentence means to temporarily let the command, followed by: hurriedly use OPEN-E ~/.bash_profile Open the. bash_profile file in a text editor: finally: Add the following to the file:
Export java_home='/usr/libexec/java_home '
Export path=${path}:${java_home}:${android_sdk_root}:${android_sdk_root}/platform-tools:${ Android_sdk_root}/tools:${java_home}:${java_home}/binexport path="/usr/local/bin:/usr/local/sbin:~/ Bin:$PATH "        
Save the file and exit, the last: Do not close the terminal, Source-e ~/.bash_profile make the file effective, shut down the terminal again, restart again, will not appear-bash:touch:command not found similar problems appear! Summary: Last night, after encountering problems, stay up to three points to solve, and then did not sleep well, your sister Ah, unexpectedly did not sleep well, big early 6:30 up and toss, start the Mac only less than one months, pit a lot.   Take it slow. Reference blog: http://blog.sina.com.cn/s/blog_4b55f6860101h3bb.html http://blog.csdn.net/cike110120/article/details/50408095

How to successfully solve the MAC command under no circumstances

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.