Часто используемые команды Linux

Переменные среды

Environment Variables
Command Example/Syntax Comments For more details
printenv # printenv

# printenv PATH
Displays environment variable names and values.
When called with the name of an environment variable, it displays the value of that variable.
man page for printenv
env # env The env utility runs a program as a child of the current shell, allowing you to modify the environment the current shell exports to the newly created process. man page for env
export # export TEST=deepak
# env | grep TEST

TEST=deepak
When you run an export command with variable names as arguments, the shell places the names (and values, if present) of those variables in the environment. man page for export
set # TEST=deepak
# set | grep TEST

TEST=deepak
Display variables in the current shell
These variables comprise shell variables (variables not in the environment) and environment variables.
man page for set
Читать по теме
Интересные статьи