My terminal is frozen with completed process

It is a brand new MacBook Pro. I need the terminal for my software engineering courses. All the info I found has no solution. I have quit the terminal. Turned the whole computer off. I tried everything I could find and nothing worked. I am starting to freak out, I am falling behind.


Please help.

MacBook Pro 14″, macOS 14.5

Posted on Aug 1, 2024 11:33 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 2, 2024 2:08 PM

If you are suggesting that launching the Terminal immediately produces the process completed message in it, then you have a Shell startup file with an exit command in it.


If that is the case, quit the Terminal and open a new Finder Window on your home directory. Make a new folder and name it Dotfiles. Then press shift+cmd+. to reveal the hidden files in your home directory.


If you are still using the Bash shell, look for and move the following dotfiles into the Dotfiles folder:

  • .bashrc
  • .bash_profile
  • .bash_login
  • .bash_logout
  • .profile


and the Zsh shell:

  • .zshrc
  • .zshenv
  • .zlogin
  • .zprofile


Now, launch Terminal again and see if it generates the process completed message.

7 replies
Question marked as Top-ranking reply

Aug 2, 2024 2:08 PM in response to SmithMack68

If you are suggesting that launching the Terminal immediately produces the process completed message in it, then you have a Shell startup file with an exit command in it.


If that is the case, quit the Terminal and open a new Finder Window on your home directory. Make a new folder and name it Dotfiles. Then press shift+cmd+. to reveal the hidden files in your home directory.


If you are still using the Bash shell, look for and move the following dotfiles into the Dotfiles folder:

  • .bashrc
  • .bash_profile
  • .bash_login
  • .bash_logout
  • .profile


and the Zsh shell:

  • .zshrc
  • .zshenv
  • .zlogin
  • .zprofile


Now, launch Terminal again and see if it generates the process completed message.

Aug 2, 2024 2:22 AM in response to SmithMack68

If you press control+D or type exit in the Terminal, you will likely get the process complete message and then you will need to quit the Terminal and relaunch it. That is the expected behavior with those specific inputs. You do not want any exit command in your Shell dotfiles as the same result will occur.


My Terminal is configured to close the Terminal window (but not quit Terminal) when these are entered. This sets one up to open a new Terminal window from its Shell menu, or simply quit the application.


Don't forget that at the Terminal level, you are exposed to a UNIX operating system and the behaviorisms of Bash, Zsh, or in some cases, Ksh shells.

Aug 2, 2024 2:38 PM in response to SmithMack68

Depending upon the Shell you are using for the Terminal, it is odd that you did not find any of the above files prefaced with a dot (.) which makes them hidden in UNIX (and the Finder). They may not by default all be present. You did select shift+cmd+i in a Finder Window with your home folder selected?


Are you also using a package manager (e.g. homebrew, MacPorts, npm)? One has to be careful about packages shoving stuff into the Shell dotfiles.

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.

My terminal is frozen with completed process

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