Environment variables
So far we have only talked about variables that are local to a script. There are also system wide environment variables (env vars) which play a very important part of any Linux system. Here are a few, some of which the reader may already be aware of:
Variable |
Role |
---|---|
|
user's home directory |
|
directories which are searched for commands |
|
command line prompt |
|
hostname of the machine |
|
shell that is being used |
|
user of this session |
|
text editor to use for |
|
number of commands that will be shown by the history command |
|
type of command line terminal that is being used |
Most of these are self-explanatory, however, I will mention ...
Get Linux Shell Scripting Bootcamp now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.