简体   繁体   中英

Unix Environment Variable Not displaying correctly

I am implementing public private key based authentication and I need to parameters the location where I store my keys. So that, programmatically my jobs can read it from this location and establish the authentication.

I added the below line in the file /etc/profile . export PRIVATE_KEYS_PATH=<Some_Path>

I logged out of terminal and logged back in and I could see the value of the above variable using either of the commands echo $PRIVATE_KEYS_PATH or env

However, same is not getting displayed when I am running either of the commands on Visual Studio Code. Any idea? Is there a better place where I can mention this environment variable

PS: I am using bash.

Some terminals needs a logout and relogin to apply new env(s) you can read more about Login shells...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM