System-wide environment>>LAB QUESTION 8

Can someone please help me understand why solution displayed isn’t recognized?

Thanks a million!!!

I just did this task and it passed. Can you share your environment file please?

Hi @al1,
find attached. Please let me know if you need more information.
Appreciate your feedback.
Thanks

You don’t need to put export and the value does not have to be in quotes.

@al1 ,
My bad, I should have tried that option but I observed the following:

  1. Printenv GLOBALOPTION yield no result.
    2)Echo $GLOBALOPTION yield result.

Any idea why?

Thanks

Because the loading of env vars already happened when you login. When you update /etc/environment it only applies to users who login after the file was modified.

To see it in your current shell you need to run source /etc/environment

Hi @al1,
I have revised the lab again but the issue still exists. I am curious because when I use the “export” command, the issue does not exist (see previous screenshot).

Variables set in /etc/environment are globally available but not listed by export because they are imported by the session manager, not exported by the shell, unlike variables set with export in shell sessions.