Where are environment variables stored and how to remove them

iKingNinja 120 Reputation points
2023-04-20T10:36:03.0966667+00:00

Hello, I discovered it's possible to set environment variables using the

export key=value

command in the shell, but now I'm wondering: how can I remove an environment variable stored like this and where are they stored?

Developer technologies ASP.NET ASP.NET Core
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2023-04-21T06:22:20.56+00:00

    Hi @iKingNinja

    how can I remove an environment variable stored like this and where are they stored?

    You can refer to this article: Use multiple environments in ASP.NET Core
    In the local machine development: the environment can be set in the Properties\launchSettings.json file of the project. Environment values set in launchSettings.json override values set in the system environment.
    In the production environment: It depends on the production environment, for example, in windows server, you can set the ASPNETCORE_ENVIRONMENT environment variable with web.config. Then, in macOS, Machine-level environment variables are set in the .bashrc or .bash_profile file. Edit the file using any text editor.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Best regards,
    Dillion

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.