bash export

Updated: 28 December 2022

See https://www.digitalocean.com/community/tutorials/export-command-linux

Export is a built-in command of the Bash shell. It is used to mark variables and functions to be passed to child processes.

Display all exported variables

export

View all exported variables on the current shell

export -p

Declare and export a variable

export STUDENT=Divya

Display a variable

printenv STUDENT

Remove an environment variable

unset STUDENT

Leave a comment