Today, we will talk about the environment variables in cowardliness, environment variable is like
a variable in any programming language that we can set to a value and use it any time in our terminal
when we need it, when we open a terminal window.
A new batch process will be created and which it has its own environment variable.
If we want to create a new environment variable, we simply use the export command.
Let us try to create an environment variable that holds our Kelly Linux IP address, and we will name
it DSD IP.
Let's check if our variable is created by using the echo and calling our variable with a dollar sign.
Perfect.
Now let's ping our own local IP using this new variable.
Notice this environment battle will be only available in the terminal window, but if we are open another
one, this variable will be gone.
If we want to make it through old shells, we must add it to the up to the our dot Benghazi.
Or if you're using the Z shell, then we add it to the dot Z S.H., our C file, the dot Benghazi or
the Dot S.H. Z.
S HRC should be located in the home directory of your user.
If it's not found then simply created using the touch command.
But before we do that, let's open another shell and see if we can call the same variable we just created.
As you can see, there was no output from the command simply because the variable we created in the
other terminal, not this one.
Now let's open our DOD Benghazi file and add the export line to it.
Now, let's open another Besch window and see if we can use this variable.
Perfect, we were able to use the variable we just added to our Dubash RC file, and since this file
is loaded, every time the user logs into the system, all the environment variables in the file were
loaded as well.
Now, we have reached the end of this lesson.
Thank you.
And see you in the next one.