Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Environment and Redirection Environment Variables

Gul Asnani
Gul Asnani
15,138 Points

Opening a new tab means switching to new session. So why does "PATH" get exported to a new tab?(At about 15:30 in video)

A new session is not a child process, so it should not be exported. But in the video at about 15 minutes 30 seconds, we open a new tab and see the updated PATH variable, which doesn't happen on the console provided by treehouse I'm using. EDIT: Another small doubt is, why does the PS1 variable doesn't get exported to the child processes?

nico dev
nico dev
20,364 Points

I was wondering the same. I even went on and closed and started a new console window, then I tried signing out and in from Treehouse, and I even took it further and restarted first the browser, and finally the computer :D ... but "/home/treehouse/bin" is still first in the list of the PATH when I execute echo.

May it be related with the Landscape they use to virtualize the console?

Gul Asnani
Gul Asnani
15,138 Points

Nico Trivelli but I am encountering a totally opposite problem! The video shows that the changed value of PATH variable remains intact even on opening a new tab, which is also what you observe. But in my treehouse console, opening a new tab sets the value of PATH to its original value, what should actually be according to the concept.

nico dev
nico dev
20,364 Points

Ah no, sorry for my misunderstanding!

I then have no idea honestly about why if you're using the exact same virtual console, you get a different behavior.

Yeah, if I understood him correctly, he said that when you start a new session, the value will be initialized again top the default PATH (but it din't happen to me, although I was expecting the reason may have been the virtualization). But if you tell me yours did it exactly like that...

Let's hope someone else will bring some insight into it.