How to display the contents of an environment variable from command prompt?

If you are looking at options to display the contents of an environment variable from the command line , you can use various commands to do this.

How to display the contents of an environment variable from command prompt in Windows 10 ?

Use the below command in the Windows 10 Command prompt to get the entire variable list as s single string

echo %PATH%

Use the below command to get the list of all the environment variables in multiple lines

set