List environment variables in Shell

visibility 53 access_time 4 years ago languageEnglish timeline Stats
timeline Stats
Page index 0.05

Environment variables are commonly used in many frameworks or programs.

In bash, to list environment variables, you can use env command. 

To list a certain environment variable, you can use ${EnvironmentVariableName}.

Code snippet

env
echo ${USER}
echo ${SHELL}
info Last modified by Raymond 4 years ago copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

More from Kontext
List and kill jobs in Shell / Hadoop
visibility 362
thumb_up 0
access_time 4 years ago
gzip Compress a directory (folder)
visibility 405
thumb_up 0
access_time 10 months ago
List Hadoop running jobs in Shell / Hadoop
visibility 199
thumb_up 0
access_time 3 years ago