Terminal stuck on process completed upon opening

Hello is there any fix for the Terminal Application, when I open it, it says process completed and will not let me type anything. I have tried opening new shells and new windows and that does not fix the problem. They all say the same thing.


Thank you

Posted on Feb 27, 2023 03:53 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 28, 2023 06:18 AM

One of your SHELL dot files has an exit command in it which kills the current Terminal process. Open a Finder Window, and press shift+command+period. This will show your UNIX hidden files in your home directory and depending on the default SHELL these might be:


Bash


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


Zsh


  • .zshrc
  • .zprofile
  • .zshenv


Click once on the dimmed, individual dot file and press the space bar. The Finder's Quick Look feature will show the contents of each of these text files. When you find the one that has the exit command in it, right-click on it and open it in ideally a programmer's editor of your choice, or TextEdit — and remove the line with the exit command in it. Save the file as plain text. That should resolve the Terminal quitting upon launch.


To restore your Finder Window to its normal view, press shift+command+period again.

1 reply
Question marked as Top-ranking reply

Feb 28, 2023 06:18 AM in response to itscloco

One of your SHELL dot files has an exit command in it which kills the current Terminal process. Open a Finder Window, and press shift+command+period. This will show your UNIX hidden files in your home directory and depending on the default SHELL these might be:


Bash


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


Zsh


  • .zshrc
  • .zprofile
  • .zshenv


Click once on the dimmed, individual dot file and press the space bar. The Finder's Quick Look feature will show the contents of each of these text files. When you find the one that has the exit command in it, right-click on it and open it in ideally a programmer's editor of your choice, or TextEdit — and remove the line with the exit command in it. Save the file as plain text. That should resolve the Terminal quitting upon launch.


To restore your Finder Window to its normal view, press shift+command+period again.

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.

Terminal stuck on process completed upon opening

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