What Is Export in Linux Command?
Contents Export Is Bash Shell Builtins Commands, Which Means It Is Part of the Shell. It Marks an Environment Variables to Be Exported to Child-Processes. …...
export is bash shell BUILTINS commands, which means it is part of the shell. It marks an environment variables to be exported to child-processes. … The export command, on the other hand, provides the ability to update the current shell session about the change you made to the exported variable.
How do I export a variable in Linux?
For example, Create the variable called vech, and give it a value “Bus”:
- vech=Bus. Display the value of a variable with echo, enter:
- echo “$vech” Now, start a new shell instance, enter:
- bash. …
- echo $vech. …
- export backup=”/nas10/mysql” echo “Backup dir $backup” bash echo “Backup dir $backup” …
- export -p.
29 мар. 2016 г.
Must Read
What is Export command in Ubuntu?
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.