I have this problem since weeks: my ZSH terminal on start up shows an error and even with most commands (especially if they are sudo).

All results are "killed", sometimes with "Killed: 9". I searched on the web and found out that could be an error with brew. But even following some steps, I cannot uninstall it with terminal command (killed).

I have a MacbookPro M1 PRO (2022). Could you help me to solve this issue?

zsh: killed on terminal just opened

Even opening terminal on VSCode, end up with same error

  • 3
    Did you migrate from an Intel Mac to a Silicon Mac?
    – Allan
    Commented Jun 3, 2023 at 13:20
  • It would help to know which macOS version you are running. If you are fine with doing so, change your default shell to bash and see if the problem goes away. You can always change it back.
    – pwn'cat
    Commented Jun 3, 2023 at 13:23
  • 2
    This is not zsh getting killed, it's zsh telling you that the program it started was killed with SIGKILL (signal 9). Does it happen only with programs installed through brew or also with programs from /usr/bin? Does it happen with an empty or almost empty environment, for example /usr/bin/env -i /bin/ls or /usr/bin/env -i /bin/mkdir /tmp/aaa ? Commented Jun 3, 2023 at 19:03
  • @Allan No, I've only used Silicon Mac @pwn'cat the last one MacOS Ventura 13.4. I've already tried changing to bash, it kills commands too! @Gilles'SO-stopbeingevil' I cannot create neither, for example, a dir with sudo mkdir /tmp/uninstall to use bash and brew uninstall script found on the web.
    – Tech_Break
    Commented Jun 4, 2023 at 21:14
  • Based on your comments especially the one about finding the script on the web, it may be specific to Intel. Try installing Rosetta: softwareupdate --install-rosetta
    – Allan
    Commented Jun 4, 2023 at 21:25

1 Answer 1


enter image description here

Terminal cannot find where ls is located.

Try this:

whereis ls

enter image description here

So ls is located in bin/ls. So use that complete path[bin/ls].

Command: bin/ls

enter image description here

Try whereis [command_name] and then do the same for every command.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .