Linux export command to set environment variables

Linux export command is used to set or display environment variables.

export can add, modify or delete environment variables, program for subsequent executions of use. Effectiveness of export and only once in the landing operation.

grammar

export [-fnp] [Variable Name] = [Variable Settings]

Parameters :

  • -f on behalf of [variable name] as the function name.
  • -n delete the specified variable. Variable is not actually deleted, but not output to the subsequent instruction execution environment.
  • -p lists all the shell environment variables given program.

Example:

# Export MYENV // define environment variables

# Export MYENV = 7 // define environment variables and assigns

# Export -p // list the current environment variable value

Guess you like

Origin blog.csdn.net/zd845101500/article/details/91817050