0

Recently, every time I open the Terminal on my Mac, it outputs the system settings. This also happens when I use other terminal applications. I am wondering if there is any solution for this. My macOS version is Ventura 13.5.

Here is the exact output when I open the terminal.

HOME=/Users/*******
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_REPOSITORY=/opt/homebrew
INFOPATH=/opt/homebrew/share/info:
LC_CTYPE=UTF-8
LOGNAME=*******
MANPATH=/opt/homebrew/share/man::
OLDPWD=/Users/*******
PATH='/Users/*******/.orbstack/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin'
PWD=/Users/*******
SHELL=/bin/zsh
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.eoPAf8FbWG/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=447
TERM_SESSION_ID=3DA66955-3D75-4204-8783-**********
TMPDIR=/var/folders/86/x3knyfyx2jg4ygccknl_yjpw0000gn/T/
USER=*******
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
__CFBundleIdentifier=com.apple.Terminal
*******@MacBook-Pro ~ % 

Any advice or solution would be greatly appreciated. Thank you in advance!

I've tried rebooting my computer, but the issue persists. And, as far as I recall, I haven't made any changes to my system configuration recently.

ShawnWen
  • 1
  • 1
  • That is a list of the environment variables in your shell. The list may be coming from one of your shell start up scripts issuing the `set` command. You may need to review your shell startup scripts like ".zshrc", ".zlogin" and ".zprofile" to see if there is a bare `set` command in any of them. – Scott Thompson Jul 31 '23 at 15:41
  • @ScottThompson : One should also check .zshenv. And since the printed variables seem to environment variables, I would not only look for a bare `set`, but also for a bare `env` or `printenv`. – user1934428 Aug 01 '23 at 08:17

1 Answers1

-1

I seem to have found a solution to my issue. I deleted the .zsh_sessions folder in my personal directory and re-opened the terminal, and the issue was resolved.

I believe this may be a bug in macOS. If you encounter a similar problem, you might try this solution. However, please be aware that deleting certain files could have unintended consequences, so always proceed with caution.

Thank you all for your attention and help!

ShawnWen
  • 1
  • 1
  • This is unrelated to MacOS. Every output produced on startup is produce by your zsh setup files, and you are the one who is in care of those files. Most likely, you had in your startup files a command, which printed the content of `.zsh_sessions`, and after you delete the file, nothing is printed. Hence you have to debug your startup files. – user1934428 Aug 01 '23 at 08:11