env's Examples

access all environment variables and the values associated with them we give env command without any option

$ env

all the line are displayed without any new line

env -null

gives the env version

env --version

remove a variable from the environment

env -uname

prints the user name

env logname

prints all variables in the linux system

$ printenv

to list a specific variable just pass the name to the command

$ printenv SHELL

gives the path

$ printenv PATH

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us