Sorted list of Environment Variables
In Linux you may want to see your environment variables alphabetically sorted.
printenv | sort
If for some reason you want a reverse sort – use the -r switch.
printenv | sort -r
In windows the “set” command prints an already sorted list of environment variables.