To get the most from your Linux system, you need to understand environment variables and be adept adept
at managing them for optimal performance, convenience and even stealth.
So among the areas that the Linux newcomers find problematic, however, managing the user environment
variables might be the most difficult to master.
So technically, there are two types of variables.
The first is shell, and the second is environment.
So environment variables are system wide variables built into your system and interface that control
the way your system looks, acts and feels the to the user and they are inherited by end charge shills
or processors.
Social variables, on the other hand, are typically listed listed in lowercase and are only valid in
their shell.
They are set in.
So to avoid over explanation, I just, uh, cover some of the most basic and useful skills for environment
and shell variables in this lectures and don't go too deeply into the differences between them.
So variables are simple strings in key value pairs.
So again, or generally, each pair will look like this, for example, key and value key here and add
value here.
So.
In cases where there are multiple values, they will look like this is a value one value to and value
three and vice versa here.
So as with most things in Linux, if there are spaces in the value, it needs to be contained in a quotation
marks here.
Like that?
While the fourth.
So.
So in in your environment, in your shell is your best shell.
So each user, including ruled, has a different set of environment variables that determine how the
system looks, acts and.
So you can change the values for these variables to make your system work more efficiently.
Tailor your work environment to best meet your individual needs and potentially cover your tracks if
you need to.
So leaving and modifying environment variables so you can be while your default environment variables
by entering any V into your terminal from any directory like so here.
So as you can see, there is a light environment variables here.
So environment variables are always upper case, as you can see here.
So, including shell variables, local variables and show functions such as any user defined variables
and command aliases, some use a set common this command will list all environment variables.
Um, on environment variables unique to your system, which is the most cases will give you an output
so long you won't be able to view it, uh, on a single screen here.
So you can see here.
We have so many environment variables here.
As you can see here, we can see, because it's so many here, so, uh, we can do like that, sit here.
Said.
And more here.
Now we can see like that by pressing enter.
We can see a sequential.
So let's see more more and, uh, press in one time control and save or exit or quit here.
So now the last three of us here, as you can see here, feel, uh, will fill up on a screen line by
line and then stop.
Uh, when you press enter like that, uh, or space or, uh, spin in space and you will see more here.
Uh, so, uh, taking you to the next variable so you can scroll through pressing or holding, enter
like that.
So.
As you might recall, from previous chapters and elections, whenever you you use, the more common
for output you can enter key it to or exit and return command to like that or control plus easier.
So filtering for particular variables?
Let me, uh, see here.
So, uh, I'll talk to you using sent, uh, with more gifts, more, uh, manageable results than working
through the whole chunk of variable names you get with this sit along like that.
Uh, so.
It can still be a rather tedious if you are looking for a particular variable.
Instead, you can use the filtering command grant, um to find your variable of interest.
So let's use the variable his size as an example.
So this variable contains his size on this variable contains the maximum number of comments you were.
Common history of a file was stored.
So his size is the maximum and number of commands your command history file will start to his commands
or any was previously typed into your command prompt in the session and can be recalled with your up
here, up and down, uh, keywords like that.
So you're not at his size, doesn't store the comments themselves, just a number of them that can be
stored so popular, sit here said, Oh crap, actually cramp his size.
Yeah.
Well, as you can see, his size is 1000.
As you can see, the common finds the variable, his size, and this place is its value.
The default value of this variable is probably set to one thousand here, as you can see on your system,
too.
So this indicates the terminal this storage would last 1000 commands by default.