export
shell builtin to mark variables for child processes
TLDR
Set an environment variable
SYNOPSIS
export [options] [name[=value]]
DESCRIPTION
export marks shell variables for export to child processes. Exported variables become environment variables visible to all commands run from the shell.
When a variable is exported, it's passed to the environment of any command or script executed from that shell. This is essential for configuration like PATH, EDITOR, and application-specific settings that child processes need to inherit.
Variables set without export remain local to the current shell. The -n option removes the export attribute while keeping the variable defined. Common in shell scripts and initialization files like .bashrc and .profile.
PARAMETERS
-n
Remove export property from variable-f
Export shell functions-p
Print all exported variables
CAVEATS
Shell built-in command. Changes only affect current shell and its children. Variables set without export are local to the shell. Use in shell scripts and startup files.
