Skip to content

Disable the events #1

@hash-data

Description

@hash-data

To set the TELEMETRY_DISABLED="true" variable as a global environment variable on your Mac (so it persists across terminal sessions and for all users), you can add it to one of your shell configuration files. Here's how to do it based on your shell (zsh, bash, etc.):

Step 1: Determine Your Shell

Run this command to check your default shell:

echo $SHELL
  • If it shows /bin/zsh, you're using Zsh (default on macOS since Catalina).
  • If it shows /bin/bash, you're using Bash.

Step 2: Add the Variable to the Shell Configuration File

Depending on your shell, edit the appropriate file:

For Zsh (macOS default)

Open ~/.zshrc (for the current user) or /etc/zshrc (system-wide):

nano ~/.zshrc

Add this line at the end:

export TELEMETRY_DISABLED="true"

Save (Ctrl + O), then exit (Ctrl + X).

For Bash

Open ~/.bash_profile (for the current user) or /etc/profile (system-wide):

nano ~/.bash_profile

Add the same line:

export TELEMETRY_DISABLED="true"

Save and exit.

Step 3: Apply Changes

Run this to reload the shell configuration:

  • For Zsh:
    source ~/.zshrc
  • For Bash:
    source ~/.bash_profile

Step 4: Verify

Check if the variable is set:

echo $TELEMETRY_DISABLED

It should print true.

Or can use the below command to print all env :

printenv

Alternative (System-Wide for All Users)

If you want this variable to apply to all users, you can add it to /etc/zprofile (Zsh) or /etc/profile (Bash) instead.

Now, the variable will persist across terminal sessions and reboots. 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions