Good day. Is any one able to help me with Mac terminal? I guess i have done something that is affecting it, as it is stuck and i cannot even type anything in it

Good day.


Is any one able to help me with Mac terminal? I guess i have done something that is affecting it, as it is stuck and i cannot even type anything in it. It is frozen!


I am not very vast using he Mac Book.

MacBook Pro Retina

Posted on May 21, 2021 6:21 PM

Reply
Question marked as Top-ranking reply

Posted on May 22, 2021 5:15 PM

Is the "source ~/.bash_profile" line contained within this file or did you issue the command within the terminal itself?


If you put this line in the "~/.bash_profile" file, then you are going to cause a recursion type loop that will never finish. You will need to quit the Terminal app and edit the file using TextEdit or by booting into Recovery Mode to edit that line out. Also using the tilde in a script is not a good idea. In a script if you want to indicate the home folder, then use "$HOME/<rest-of-path>". FYI, the "~/.bash_profile" file is a script.

Similar questions

8 replies
Question marked as Top-ranking reply

May 22, 2021 5:15 PM in response to aleemidrees

Is the "source ~/.bash_profile" line contained within this file or did you issue the command within the terminal itself?


If you put this line in the "~/.bash_profile" file, then you are going to cause a recursion type loop that will never finish. You will need to quit the Terminal app and edit the file using TextEdit or by booting into Recovery Mode to edit that line out. Also using the tilde in a script is not a good idea. In a script if you want to indicate the home folder, then use "$HOME/<rest-of-path>". FYI, the "~/.bash_profile" file is a script.

May 22, 2021 5:36 PM in response to aleemidrees

It sounds like you just need to open a new window. In Terminal, go to the "Shell" menu and choose "New window" > "New window with profile - basic".


However, there is no guarantee that will work. The commands you entered were wrong. I think you may have gotten lucky this time. You shouldn't have used the "sudo" command for this.


Otherwise, without knowing exactly, and I mean precisely, what you did, down to the individual keystrokes, there is no way to tell if your change worked or if your Terminal will work in the future.


Start by opening a new Terminal window. See if your new Terminal window works as it did before. Then see if terraform is now in your path and you can launch what ever it is. Reply back is anything is amiss.

May 21, 2021 6:57 PM in response to aleemidrees

We would need to know the exact commands you were using.


FYI, you should not just blindly enter (or copy & paste) commands you find online. Many times those commands will need to be customized for your system anyway. The command line offers you no protective safety net like the macOS GUI does. You can easily break macOS and destroy all your data if you are not careful. Sometimes just simply typing just one wrong character is enough to make a good command bad.


You should be able to use Control + C to terminate the process you started. If not, then just close the Terminal app. Try rebooting the Mac.

May 21, 2021 8:42 PM in response to BobTheFisherman

Version is 10.12.6, MacOSSierra, MacBook Pro (Retina, 13-inch, Early 2015)

commands entered was : sudo vi ~/.bash_profile in order to insert

PATH="/opt/terraform:${PATH}"

export PATH

source ~/.bash_profile


After i inserted this, then what i noticed is that when i get into my terminal, message "Process completed" shows up and then i am not able to type in anything in the terminal. This is the message on the terminal;


Last login: Fri May 21 22:29:05 on ttys000


[Process completed]


Thank you for the help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Good day. Is any one able to help me with Mac terminal? I guess i have done something that is affecting it, as it is stuck and i cannot even type anything in it

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.