Sorted list of Environment Variables

In Linux

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

In windows the “set” command prints an already sorted list of environment variables.

Leave a Reply

Your email address will not be published. Required fields are marked *