M1 - Ventura Terminal issue ( zsh: killed ls )


Hi,

Hope you are doing well. Recently I have downloaded homebrew for installing mongodb and now all commands are not working. everytime I am getting "zsh: killed ls". not able to fine any solution or support.

Posted on Jan 19, 2023 04:20 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 19, 2023 05:11 AM

Try looking at settings in Terminal. Go to Terminal, Settings, General. Check to see if 'Shells open with' is set to 'default login shell'. Or is it set to an incorrect or bogus location in the 'Command (complete path)' option. As a work around you could also set the 'Command (complete path)' to: /bin/bash

That will change the default shell to bash and ls should work properly as well as all the other commands.


Also I found this so it perhaps is related to HomeBrew?:

New MacosVentura 13.1 installed killed zs… - Apple Community


Similar questions

9 replies
Question marked as Top-ranking reply

Jan 19, 2023 05:11 AM in response to AuthenticMBC

Try looking at settings in Terminal. Go to Terminal, Settings, General. Check to see if 'Shells open with' is set to 'default login shell'. Or is it set to an incorrect or bogus location in the 'Command (complete path)' option. As a work around you could also set the 'Command (complete path)' to: /bin/bash

That will change the default shell to bash and ls should work properly as well as all the other commands.


Also I found this so it perhaps is related to HomeBrew?:

New MacosVentura 13.1 installed killed zs… - Apple Community


Jan 19, 2023 05:47 AM in response to AuthenticMBC

AuthenticMBC wrote:

Recently I have downloaded homebrew for installing mongodb and now all commands are not working. everytime I am getting "zsh: killed ls". not able to fine any solution or support.

Pretty standard result.


You can go to the "Shell" menu in Terminal and run "New Command". In the dialog box, you can manually type in the path to a shell like "/bin/zsh" or "/bin/bash". Hopefully that will get you up and running so you can correct whatever damage Homebrew has done to your environment.


In a worst-case scenario, you can even use this as the command in that dialog:


/bin/zsh --no-rcs


This will run zsh without loading any dot files. You can take that opportunity to fix the ones you have and/or rebuild your installation. I recommend keeping a couple of windows open so you always have one that is functional.

Jan 19, 2023 08:49 AM in response to AuthenticMBC

AuthenticMBC wrote:

I tried "/bin/zsh --no-rcs" and ls command works fine in the window on the left but when i open a new window it still doesn't work

It doesn't fix anything. It just opens a new window where you have a useable environment. You have to work in that useable environment and fix whatever damage Homebrew has done.


You can create a new User account on your computer. Then, in your working window, using the "sudo" command and assigning the correct permissions and ownership, you can copy the various dot files from the new user account to your broken account. Once you get Homebrew out of your path and/or delete it, then your environment will work again. Keep at least one working window open until you get your environment fixed.

Jan 19, 2023 10:14 AM in response to AuthenticMBC

AuthenticMBC wrote:

I'm newbie in all this staff and it's quite difficult for me to figure out, how can I assign the correct permissions and ownership to Homebrew ?

You don't. You delete Homebrew. That's the only advice I can give. If you want actual support from Homebrew, you'll have to contact the Homebrew Help Desk. (Note: I'm just being sarcastic. There is no Homebrew Help Desk or any support of any kind. They release that junk to the world with the expectation that someone else is going to clean up the mess for them.)


What I'm asking you to do is create a new User account on your Mac. That new account will have a fresh set of dot files like ".zshrc" or whatever. Just copy all of those dot files from the new account to your current account. Note the current permissions on those files. You will need to do something like:


sudo chown AuthenticMBC:staff .zshrc


Depending on what your current files look like. Make it look like your current files. Your group might be "wheel" instead.


None of your Python code or anything is going to work in this kind of environment. It is only to fix whatever is broken. Then, you'll need to delete Homebrew. Then, you can properly install Python and whatever else you need.

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.

M1 - Ventura Terminal issue ( zsh: killed ls )

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