This line appears when I open the terminal on my Mac

zsh: killed     mkdir -m 700 -p "$SHELL_SESSION_DIR"


as soon as I turn on the terminal it shows this line: zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR". Is there any way to turn it off?


[Edited by Moderator]


MacBook Pro 13″

Posted on May 5, 2023 11:09 PM

Reply
Question marked as Top-ranking reply

Posted on May 6, 2023 2:38 AM

You must have something in one of the files that are read when zsh starts, that is causing this.


It could be ~/.zshrc


Try this:


In Terminal, press Command-, to open the Settings window, and temporarily change shell from "default" (which is zsh) to /bin/bash


Open a new window. Type


cat ~/.zshrc


and tell us the output.

3 replies

May 6, 2023 4:57 AM in response to LuongAnhTu

The default permissions of that $SHELL_SESSION_DIR and its contents are already set to 700 (e.g. drwx------) by default and since that directory exists by nature of using Zsh, the mkdir -p command should do nothing when it encounters that existing location.


What others have said about the ~/.zshrc file, which should not contain anything other than export, alias, or bindkey commands in it. Function declarations ideally should go into the ~/.zshenv file, and no binary compiled commands should be run from within either of these dot-files.

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.

This line appears when I open the terminal on my Mac

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