Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6531859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:55:45+00:00 2026-05-25T09:55:45+00:00

I am trying to understand the use of export command. I tried using man

  • 0

I am trying to understand the use of export command.

I tried using man export, but there is no manual for this command.

Can anyone please help me out understanding the use of export in UNIX?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:55:46+00:00Added an answer on May 25, 2026 at 9:55 am

    When you execute a program the child program inherits its environment variables from the parent. For instance if $HOME is set to /root in the parent then the child’s $HOME variable is also set to /root.

    This only applies to environment variable that are marked for export. If you set a variable at the command-line like

    $ FOO="bar"
    

    That variable will not be visible in child processes. Not unless you export it:

    $ export FOO
    

    You can combine these two statements into a single one in bash (but not in old-school sh):

    $ export FOO="bar"
    

    Here’s a quick example showing the difference between exported and non-exported variables. To understand what’s happening know that sh -c creates a child shell process which inherits the parent shell’s environment.

    $ FOO=bar
    $ sh -c 'echo $FOO'
    
    $ export FOO
    $ sh -c 'echo $FOO'
    bar
    

    Note: To get help on shell built-in commands use help export. Shell built-ins are commands that are part of your shell rather than independent executables like /bin/ls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand how to use Wireshark right now, but the official manual
I am trying to understand how to use reference parameters. There are several examples
I am trying to understand the use of XAML instead using it as markup
I am trying to understand the below use of a lambda expression. This code
I'm trying to understand js module patterns in use with jQuery. I've edited this
I'm trying to wrap my head around this, but I simply don't understand why
Trying to understand the use of verifySet etc... but unless I do a workaround
I am trying to understand how to use external entities, but I am missing
I am learning Django and I am trying to understand the use of models.py
I'm trying to understand when to use self.method_name vs. when to use Classname.method_name. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.