What does export do in BASH?
Fresh3 days ago
Mar 15, 2026195457 viewsConfidence Score1%
1%
Problem
Possible Duplicate: Difference between “a=b” and “export a=b” in bash It is hard to admit, but I have never really understood what exactly does to an environment variable. I know that if I don't export a variable I sometimes can't see it in child processes, but sometimes it seems like I can. What is really going on when I say and when should I not export a variable?
Error Output
export foo=5
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: What does export do in BASH?
Low Risk
Exported variables get passed on to child processes, not-exported variables do not.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix