1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 13:22:09 +02:00
tldr/pages/linux/export.md
Nicholas Moen d0d27e1f6e
export: edit page (#12573)
* export: add -p example
2024-04-18 10:00:49 +05:30

519 B

export

Export shell variables to child processes. More information: https://www.gnu.org/software/bash/manual/bash.html#index-export.

  • Set an environment variable:

export {{VARIABLE}}={{value}}

  • Unset an environment variable:

export -n {{VARIABLE}}

  • Export a function to child processes:

export -f {{FUNCTION_NAME}}

  • Append a pathname to the environment variable PATH:

export PATH=$PATH:{{path/to/append}}

  • Display a list of active exported variables in shell command form:

export -p