The best answers to the question “List all environment variables from the command line” in the category Dev.
Is it possible to list all environment variables from a Windows’ command prompt?
Something equivalent to PowerShell’s
gci env: (or
ls env: or
Jon has the right answer, but to elaborate a little more with some syntactic sugar..
SET | more
enables you to see the variables one page at a time, rather than the whole lot, or
SET > output.txt
sends the output to a file output.txt which you can open in Notepad or whatever…
You can also do
SET prefix to see all variables with names starting with
For example, if you want to read only derbydb from the environment variables, do the following:
…and you will get the following:
Displays, sets, or removes environment variables. Used without parameters, set displays the current environment settings.
To list all environment variables in PowerShell:
Or as suggested by user797717 to avoid output truncation:
Get-ChildItem Env: | Format-Table -Wrap -AutoSize
Source: Creating and Modifying Environment Variables (Windows PowerShell Tip of the Week)