What does export
mean in Ubuntu? For example:
export PATH=$PATH:/usr/src/hive/build/dist/bin/
Export is a built-in command of the Bash shell. It is used to mark variables and functions to be passed to child processes. Basically, a variable will be included in child process environments without affecting other environments.
1. "export" makes the change visible to new programs launched by bash. – Thorbjørn Ravn Andersen.
The export command is used to set environment variables on Linux, either temporarily or permanently.
A local shell variable is a variable known only to the shell that created it. If you start a new shell, the old shell's variables are unknown to it. If you want the new shells that you open to use the variables from an old shell, export the variables to make them global.
export is a command in the Bash shell language. When used to set a variable, as in your example, the variable (PATH) will be visible ("exported to") any subprocesses started from that instance of Bash. Without the export command, the variable will not exist in the subprocess.
This means, that your path is extended with /usr/src/hive/build/dist/bin/
. Normally /usr/bin, /bin, /usr/sbin, etc are "in your path". If you have a programm /bin/sh, you can just type sh to run it. If you have a program in /usr/src/hive/build/dist/bin/appname
you can just run appname to execute it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With