UNIX
Shell
–
Environment
Variables
Recap:
You
will
recall
that
before
we
took
our
side
trip
to
discuss
the
process
life-‐cycle
we
were
talking
about
shell
variables,
also
known
as
parameters.
We
needed
to
understand
the
process
life-‐
cycle
to
understand
shell
environment
variables.
Environment
Variables
• operate
the
same
as
the
variables
we
have
seen
NAME=joe
echo
${NAME}
• AND
they
are
passed
to
child
processes
• use
the
export
builPn
command
to
‘set’
• use
the
env
builPng
command
to
see
what
is
exported
Time
for
pictures:
We
will
now
walkthrough
the
passing
of
environment
variables
from
parent
to
child.
Time
for
typing:
We
will
demonstrate
environment
variables
from
the
command
line.
Environment
Variables
-‐
why
They
are
a
way
to
pass
instrucPons
to
children.
Yes
we
can
pass
informaPon
to
children
on
the
command
line,
but
what
about
informaPon
that
we
want
to
share
with
all
children
every
Pme?
Like,
where
to
look
for
executables.
Environment
Variables
-‐
PATH
The
PATH
environment
variable
tells
the
shell
where
to
look
for
executables.
echo $PATH!
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin!
Time
for
typing
Let’s
see
how
we
can
change
system
behavior
by
manipulaPng
PATH.