List environment variables in Shell

visibility 58 access_time 4 years ago languageEnglish timeline Stats
timeline Stats
Page index 0.05
more_horiz

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.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

More from Kontext
List Hadoop running jobs in Shell / Hadoop
visibility 218
thumb_up 0
access_time 3 years ago
gzip Compress a directory (folder)
visibility 467
thumb_up 0
access_time 11 months ago
List and kill jobs in Shell / Hadoop
visibility 389
thumb_up 0
access_time 4 years ago