What Is the Purpose of Export Command in Linux?
Contents

The export command is a built-in utility of Linux Bash shell. It is used to ensure the environment variables and functions to be passed to child processes. It does not affect the existing environment variable. Environment variables are set when we open a new shell session.

What is the purpose of the command in Linux?

When dealing with the Linux operating system, commands are required as inputs to inform or direct a computer program to perform a specific operation.

What is the use of export PATH in Linux?

The export command makes variables available in subshells. That is, without it, the variable PATH would not be visible in subshells. PATH is mentioned twice: As variable the value is being assigned to, left of the = sign.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest