linux - [Solved-2 Solutions] How to delete (unset) an exported environment variable ? - ubuntu - red hat - debian - linux server - linux pc
Linux - Problem :
How to delete (unset) an exported environment variable ?
Linux - Solution 1:
Linux - Solution 2:
Creating and deleting an environment variable in bash:
Test if the DUALCASE variable exists:
It does not, so create the variable and export it:
Check if it is there:
Check if it's still there:
The DUALCASE exported environment variable is deleted.
Extra commands to help clear your local and environment variables:
Unset all local variables back to default on login:
exec bash command cleared all the local variables but not environment variables.
Unset all environment variables back to default on login:
env -i bash command cleared all the environment variables to default on login.