Linux export command

When you’re managing your shell’s variables and you wish to save them to your environment you can use the export command. In this article, we will show you the basic usage of the Linux export command.

Basic export usage

MY_VARIABLE=42
export MY_VARIABLE

Editing your Linux user’s PATH

PATH=/path/to/add:$PATH
export PATH

Exporting a function

function MY_FUNC() {
    echo "In MY_FUNC"
}
export -f MY_FUNC
  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

Linux tar Command

The Linux tar command is used to compress and extract files to and from an archive. In this...

Linux file command

The file command is used to check a file’s type and contents in Linux environment. It is most...

Linux su command

The su command is most commonly used to switch to another user. You will then be able to run...

Linux wc command

If you’re interested in finding the word count or lines of a file in your Linux environment you...

Linux ln command

When you want to create “shortcuts” to different files in a Linux system you have to create a...

Powered by WHMCompleteSolution