Changing gears shall prompt your share from the environment variable here provides you with useful information,
such as the user you are operating as and the director in which you're currently working.
So the default should prompt in color text the following year.
Users here can use their name, first name and current, uh, current directory.
So if you're working with the real route user, this translates to this, for example, root at Cowley
and Core and Directory.
So you can change the name in the default shopfront by setting the value from the Florida is one variable
that so the is one variable has set of placeholders for information you want to display in the prompt,
including the name of the current user, the host name and the base name of the current working directory.
So this is very useful if you happen to have shows on multiple systems are a little bit on an as multiple
accounts.
So by setting different users and host names and values for different channels or accounts, you can
tell at a glance who you are and what your current system is.
So let's have a little fun on showing the prompt in your terminal.
For example, you could enter here.
Pierce one.
Here, uh, for example, uh, World's best anchor here and his shtick here.
As you can see here now, our common theme is like that here.
So now every time you use this terminal, you will be reminded that you are the world's best hacker.
But any subsequent terminal you open will still have the default command ground because the P is one
variable only those values for your terminal session.
Remember, until you export a variable, it is only good for that session.
So if you really like this new command prompt and want to see it in every terminal, you need to take
a unit to export it.
So like that, export P.S. one.
But I will not do it in this year, so this will make the chains so chain dependent across all sessions.
How about a little more fun?
Here's the thing you really want your terminal to look like the Windows CE in the prompt.
So that's actually it's quite boring actually here.
So say you really want your terminal to look like a windows in the prop.
So in this case, you can't change the prompt name you see and keep it down below.
Have to control your current directory as here, for example, export.
Export p es from excellent experience one.
And here in this film, we see him here, so we see and hear, you know, override Tableau for directory
extrication, as you can see here.
Here.
Like there.
We can do it for some severe bone loss.
Like that, so having a prompt from your current director, it can be generally useful.
So particularly for beginners.
And so it's something to consider when you change your form variable, we can change pet as well.
So one of the most important variables in your environment is pets.
Variable, actually, it's boring, actually.
So let's call it so one of the most important variables in your environment is your pet variable.
So which controls were very on your system your shell will look for come once you enters, such as a
see the list or equal here.
So most commands are located in Espin or bin directory here, like a user locale, spin or user.
Uh, use local being yeah.
If the file doesn't find the command in one of the directors in your pet variable, it will return the
command not formed like that, for example.
Common would and liked it.
So even if that comment does exist in the dire straits and, uh, not in your pet, so you can find
out which directors are stored in your pet variable by using Echo and all our sign and pet.
That's true.
How serious are Patea?
These are the directories where your terminal was searched for any command.
When you enter L.A., for example, the system knows to look in each um, each of these directories
for the L.
S Command and when it finds out as, uh, the system executes it like that was.
So each territory is separated by column, and you don't forget to add the dollar symbol in content
pattern, as you can see here.
So we can add them to the patch variable here.
So you can probably see why it is important to know what is in your patch variable if you downloaded
and install the new tool, let's say, for example, new hacking tool here, uh, into the root new
hacking tool directory.
You could only use commands from that tool and you are in that directory because the directory is not
in the path variable.
Every time you want it to use that, all you called you will first have to navigate routinely new hacking
of which is a bit inconvenient if you want to use tool often.
So to be able to use this new tool for any directory, you need to add the directory, uh, to holding
this tool to your path variable to add new and you hacking tool to your pet's variable.
Enter this command paths here equals here to our path and to that column here.
And, for example, route new hacking tool.
Here we added path variable here.
So this assigns the original patch variable plus this the folder here directory to path to the new path
variable.
So the variable contains everything it did before, plus new tool directory.
If you examine the contents of the patch variable, uh, again you should see that this directory has
been appended to the end of the path, as shown here and Equal Partner X.
Echo what, Pat?
So you can see where that is, uh, a rule, it's new hacking tool here.
So now you can accept new hacking tool applications from anywhere on your system rather than having
navigate to is selected in the Bachelor.
Look in our directories list for your new tool.
So how not to add that valuable?
So one mistake commonly made by new Linux users is assigning a new directory, such as the root new
hiking tool to the patch variable like that had.
Uh, here, uh, route new directory.
New hacking.
Look at this view, if you use this command, you'll pack variable will only contain the new hacking
tool.
So your pet variable will not contain this and you will delete all of these pet variables and only add
this.
This is useless.
Uh, fortunately.
So um.
And no longer contain the system binaries directories such as being on the scene, so after doing this
command, you cannot use LCD or any comments here.
So when you then go to use any of these comments, you will receive the error command not found here.
So remember that you want to append to the pet variable, not replace it.
So if you are in doubt, send the contents of the variable somewhere before you modify it.
So.
We can create a user defined variable as well, so you can create your own custom user defined variables
in Linux by simply assigning evaluate will be a new variable that you name.
So this may be useful when you are doing the same as some more advanced scripting or find you are often
using a long common that you get tired of typing over and over.
So the syntax is straightforward enter the name of your variable, followed by assignment, assignment
symbol and then the value to part in the variable as here, for example, my new variable and.
Uh, here and for example, hacking is the most valuable, valuable skill set in the twenty first century.
You.
So this assigns a string to the variable mine environment, so to see the value in the VAT in that variable
and use the Echo Command and the dollar content symbol to with the variable name, as we did earlier
here.
My new variable, which?
As you can see, they're just like our system environment variables, user defined variables must be
exported to persist to new sessions.
So if you want to delete these new moneyball. or any variable use that on set on onset myname variable
here.
So now it's equal.
And as you can see, we have no new variable pitch.
So.
You mean, because we deal with this variable with Ansett command and have to, uh, press and equal
for printing to tomorrow?
We can't see it because there is no credibility here.
After all, setting this variable.
So lastly, you might find in white, I'm afraid it was foreign, but it's worth getting to know them
so they control how your working environment in Linux looks, acts and feels so you can manage these
variables to tell in your environment, to your needs by changing them, exporting them and even creating
your own, as we did in this case.
So in some cases, these they may be useful for covering your tracks as a hacker.