What does export do?

The export command in a Unix-like shell is used to set environment variables or mark them for export to child processes.

Key Points:

  • Sets Variables: When you use export VAR=value, it creates an environment variable VAR with the specified value.
  • Makes Variables Available: The variable becomes accessible to any subprocess started from that shell session, allowing those processes to use the variable.
  • Example:
    export MY_VAR="Hello"
    This command sets MY_VAR to "Hello" and makes it available to any child processes.

If you have more questions or need examples, just let me know!

0 Comments

no data
Be the first to share your comment!