1

I am new to coding and I am learning about environment variables in python using pycharm. I am trying to hide my API KEY in the terminal for basic security however when I type env into the terminal this is the response.

env : The term 'env' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • env
  •   + CategoryInfo          : ObjectNotFound: (env:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

How can I fix this? How can I fix the path or find the path?

Laramie
  • 11
  • 1
  • 2

1 Answers1

2

env is not a program installed by default on Windows, you're probably thinking of the env command commonly used on Linux and Unix based systems to display your environment. The equivalent Windows command is Get-ChildItem Env: for PowerShell, and SET in command prompt (Thanks @ᴓᴓᴓ!)

crock
  • 423
  • 3
  • 11
  • 1
    `Get-ChildItem Env:` in powershell and `SET` in cmd https://stackoverflow.com/questions/5327495/list-all-environment-variables-from-the-command-line – ᴓᴓᴓ Jun 27 '22 at 17:27
  • thanks for the response crock I will check it out! – Laramie Jun 27 '22 at 22:25