Trouble with Terminal on MacOS Monterey

I just performed an upgrade on my Mac Pro 2020 with m1 chip, but I noticed I can’t use commands like mkdir or ls. When I do, I end up with “zsh killed” error. How do I fix this? I have removed ohmyzsh, and tried uninstalling homebrew

Posted on Jul 19, 2022 2:05 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 19, 2022 9:54 AM

Johnson44uuu wrote:

Also, i tried booting into safe mode, same issue happens as well


Testing in Safe Mode is always a good idea.

In this case, it is not surprising that the problem remains, because as far as we can tell this has something to do with the shell settings, like that PATH going through /opt/... first.


We need to determine how these go into your PATH.


There is another way to put directories in the PATH: via /etc/paths and /etc/paths.d


Let's see if that is where the homebrew thing gets there.


In Finder, press Command-Shift-G and paste

/etc


Locate the file named "paths" in this folder. Control-click and choose Open With->TextEdit.

Do not make any changes to this file. What does it contain?


In Finder, press Command-Shift-G and paste


/etc/paths.d


What files does this folder contain?



Trying to avoid a reinstall of the OS.


23 replies

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.

Trouble with Terminal on MacOS Monterey

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