Linux Environment Variables Easy Guide

282

On the previous posts we talked about some of the basic Linux commands, and today we continue our journey and we will talk about something very important in Linux which is Environment Variables

So what are Environment Variables and where it is and the benefit of knowing it?

Well the bash shell we use to run our commands uses a feature called Environment Variables to store some values which is required by the running programs or scripts from that shell, actually this is a very handy way to store persistent data and make it available for any script or a program when you run it from the shell

There are two types of environment variables in the bash shell:

  • Global variables
  • Local variables

Global variables are visible from the shell session and for any running process that run from the shell.

Local variables are visible in the shell that creates them.

Read the complete article