After i ran 'source ~/.bash_profile' cmd in the terminal, its reloading for ever

I was trying to hide/show files, for which to reload profile and make aliases available, i pasted 'source ~/.bash_profile' in the terminal and hit return. After which terminal is refreshing/reloading since then. See attached.



Posted on Feb 21, 2019 3:32 PM

Reply
18 replies

Feb 21, 2019 7:44 PM in response to vishalnayan

Let me rephrase that, if it returns you to the command prompt there are no jobs running.


Otherwise you would expect to see suspended/running job(s) with a output similar to—


[1]+  Running                 command byname 1stjob process
[2]+  Running                 command byname 2nd job process


and you would

kill %1

or

kill %2



You can see more on moving bg and fg jobs but I am not so hopeful in your situation.


https://www.digitalocean.com/community/tutorials/how-to-use-bash-s-job-control-to-manage-foreground-and-background-processes


Feb 22, 2019 7:57 AM in response to vishalnayan

Sorry I didn’t see the update. The new forum software isn’t showing me updated threads the way it is supposed to.


I have asked the hosts to remove your two iCloud sharing posts. They don’t work and they reveal personal information.


I’m not sure what you are saying in your replies. It seems like your Terminal environment is completely locked up as soon as you launch a window. From your first screenshot, it looks like you are able to control-c to break out of the loop. I’m not sure what your environment is like at that point.


Here is how to fix it:

1) Launch Terminal or switch to it. Don’t worry about the locked-up terminal.

2) In Terminal’s “File” menu, choose “New Command..."

3) In the Command text field, type the following line:


/bin/zsh


and then press the “Run” button. Do NOT check the “Run command inside a shell”.


At this point, you will be running the zsh shell in a new window. This is very similar to the bash shell. We will use zsh to fix your bash profile.

4) Enter the following command in your new, and functional, Terminal window:


mv ~/.bash_profile ~/bash_profile_broken.txt


and press the “return” key.

5) Hold down the command key and press the “N” key to open a new Terminal window with a bash shell. This time it should work. If so, you can close any non-functional Terminal windows.

6) You will be able to see the “bash_profile_broken.txt” file in the Finder now. You can open it with any text editor and study what you did wrong with it.

7) At this point, it might be a good idea to back up an explain just what you were originally trying to accomplish and we can tell you how to do that without rendering Terminal inoperative.

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.

After i ran 'source ~/.bash_profile' cmd in the terminal, its reloading for ever

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