zsh: killed

Hello. I've got some problems with doing anything in the Terminal on my Mac m1. For any command I get sign 'zsh: killed'. I'm newbie in all this staff and it's quite difficult for me to understand. Please help me to fix the terminal. Thank you. (screenshot just for example)

MacBook Air 13″, macOS 12.2

Posted on Mar 8, 2022 6:49 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 8, 2022 8:08 AM

I’d expect to see the ssh usage text with that command.


Which probably means PATH is incorrect, or that something in the zsh login script files is off.


Have you been modifying the zsh login scripts?


Here’s an intro to the files involved in zsh login and logout:


https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where


If those have been modified, you can use Finder to rename the files temporarily, which will then allow you to restart Terminal and log in anew and access and figure out what went wrong with the modifications.


Use Command-Shift-. toggle to allow Finder to display or not display those hidden files.


The following command will probably show the PATH in your shell:


echo $PATH
4 replies
Question marked as Top-ranking reply

Mar 8, 2022 8:08 AM in response to 1p2b1

I’d expect to see the ssh usage text with that command.


Which probably means PATH is incorrect, or that something in the zsh login script files is off.


Have you been modifying the zsh login scripts?


Here’s an intro to the files involved in zsh login and logout:


https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where


If those have been modified, you can use Finder to rename the files temporarily, which will then allow you to restart Terminal and log in anew and access and figure out what went wrong with the modifications.


Use Command-Shift-. toggle to allow Finder to display or not display those hidden files.


The following command will probably show the PATH in your shell:


echo $PATH

Mar 8, 2022 11:23 AM in response to 1p2b1

sudo does not provide full access, it provides root access, and which is (on macOS) rather less than complete system access.


sudo is also best deployed with some care, as it can provide sufficient access to wipe out tracts of user data.


Please follow my instructions in the reply above to temporarily rename the scripts out of your login, restart Terminal app, and see if you can log in and get the ssh usage info.


The scripts will need to have execute access:


chmod u+x {/path/to/file}


And yeah, homebrew can alter PATH, and potentially other parts of the environment.

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.

zsh: killed

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