welcome to the video tutorial on
environment variables so what is a
computing environment it is the platform
constituting an operating system with a
processor where a user can run programs
the springs are stored as a variable in
computer science a variable is a
location for storing of value which can
be a file name text number or any other
data it is usually referred to with its
symbolic name which is given to it while
creation the value the stowed can be
displayed deleted edited and resaved
variables play an important role in
computer programming because they enable
programmers to write flexible programs
as they are related to the operating
systems that we work on it is important
to know some of them and how we can
influence them so what are environment
variables well they are the dynamic
values which affect the processes or
programs on a computer they exist in
every operating systems and their types
may vary they can be created edited
saved and deleted they also give
information about the system behavior
and they change the way software or
programs behave
for example the LAN G environment
variable shows the value of the language
that the user understands this values
read by an application such that a
Chinese user is shown a Mandarin
interface while an American user is
shown an English interface these are
some of the common environment variables
will go through them once we know how to
access variables in order to determine
the value of a variable you need to use
this command it is echo space the dollar
sign then the variable name
now we'll use some common environment
variables starting with echo path
variable this variable contains a colon
separated list of directories in which
your system looks for executable files
when you enter a command on terminal the
shell looks for the command in different
directories mention in the path variable
if the command is found it executes
otherwise it returns with an error
command if not found
variables are case sensitive make sure
that you type the variable name in the
right letter case otherwise you may not
get the desired results so if we type in
the path variable this way we will not
receive a result moving on to another
environment variable the user
environment variable gives us the name
of the user trying out the home
environment variable would give us the
default path to the user's home
directory the env command displays all
the environment variables you can create
your own user-defined variable with
syntax variable name is equal to the
variable value again bear in mind that
variables are case sensitive and usually
they are created in the upper case so
let us make a new variable with this
value now for checking the value of the
newly created variable you would have to
type in this command
make sure you do not leave space between
the variable name and the equal to sign
otherwise you will get an error and do
not miss out on the dollar sign when you
are checking the value of a variable if
you press the Enter key without the
dollar sign the echo command would take
the variable name as a string instead of
a variable
moving on to deleting variables the
following syntax can be used to remove a
variable from the system
it says unset space the variable name
that is try it on terminal so now if you
want to remove the new variable and its
value that we created earlier we would
have to type in less on the terminal now
if we run the echo command followed by
the new variable we would not get a
result the unset command removes the
value of a variable permanently let us
do a quick recap environment variables
govern behavior of programs in your
operating system let us also go through
the commands that we have learned the
echo variable command is used to display
value of a variable the env command
displays all environment variables the
variable name is equal to variable value
command creates a new variable unset
followed by the variable name removes a
variable from the system export variable
is equal to value is used to set value
of an environment variable thank you for
watching this tutorial I hope to see you
in the next one