List environment variables in Shell

visibility 33 access_time 3y languageEnglish

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 3y 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

timeline Stats
Page index 0.03
local_offer Tags