The value of the export command in Ubuntu

What does export mean in Ubuntu? For example:

 export PATH=$PATH:/usr/src/hive/build/dist/bin/ 
+16
ubuntu
May 31 '12 at 21:55
source share
3 answers

This means that your path has been extended with /usr/src/hive/build/dist/bin/ . Usually / usr / bin, / bin, / usr / sbin, etc. Are "on your way." If you have the / bin / sh program, you can simply type sh to run it. If you have a program in /usr/src/hive/build/dist/bin/appname , you can simply run appname to execute it.

+7
May 31 '12 at 22:00
source share

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 running subprocesses from this Bash instance. Without the export command, the variable would not exist in the subprocess.

+24
May 31 '12 at 10:04 pm
source share

It sets the PATH environment variable to the value of any PATH currently plus the new path added to it.

+2
May 31 '12 at 21:58
source share



All Articles