How To Show Environment Variables In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Environment variables can be displayed in Linux by using one of the following commands:
• Printenv – this command will print all defined environment variables in your current shell.
• Env – this command will list all exported environment variables, including any user and system variables.
• Set – this command will list all local variables and environment variables.
• Echo – this command can be used to echo the value of a specific variable, like “echo $PATH” to display the value of the PATH variable.
• Export – this command will display all environment variables that have been exported to the current shell.