Hello and welcome to this. Cali fundamentals
lesson. I'm your host Robert Smith, and
I'm excited to be here with you today. So we've gone
over some things like commands to navigate the file system some,
you know, very high level overviews of
permissions things of that nature, but you may be wondering there's still
a lot of commands out there. There's some things I may
not know, you know, what are some additional things that I could learn
that'll help me to get around Linux and Cali and
things of that nature. Well today we're going
to jump into those things. We're going to get some some basic
understanding of some useful commands and we're
going to see how those commands could be used. And and
you know again, we'll continue to build on this Foundation that we've
put together and go from there. So I'm going
to go ahead and bring in my copy of Cali
that I've installed here and you'll see
that I've got a terminal opened up and we're currently in
the desktop folder and so
With that in mind. I've got a few things I wanted
to show you so.
You may be thinking I have an internet connection. I
can look up commands and understand what they do. But what happens if
you don't or what if you just want to see, you know, a quick
easy lookup of a command or something
like that. Well, I'd like to introduce you to the man command or
manual. So when you type man in a command like pinglets
say
it pulls up a bunch of information.
And as you can see here, it gives you the name of the command at the top a quick
synopsis. It gives you a short description some options
and as you scroll through
Down towards the bottom of all these different things that it provides.
It's got packet details and and
some additional information. So a lot of cool
stuff there now, there's multiple ways to use this. We can
hit q and that takes us back to our desktop here
do a quick clear to bring that back up.
Now we talked about cat or concatenate. So you'll
see over here to the left. I've got this. Hello bash file that I've created if
I type cat and do hello.
It shows me the output for that file. So as you can see here, I've got
some some line that I've written here for for starting a
bash script. And then I use this command called Echo. So
you might be wondering what is Echo do what does that mean? Well, we do
man Echo.
Like we were looking at earlier.
As you can see it displays the name gives you
some descriptions. It says here it displays a line of
text. This can be useful if we're writing a bash script and
we need an output or we want it to reference something
and produce an output from like the system or something of
that nature we can do that using the
echo command. So that's going to be useful for you when you start working on scripting
and things of that nature and you're jumping into you
know, trying to make some more complex ways
of doing things or simplifying things and things
that nature now,
You can easily use Leaf pad down here and edit
text and do things of that nature and edit files.
But let's say I'm here on this desktop folder and I just
want to jump straight into that text file or that
bashful. I can do Nano and hello.
And Bam, there we are. I've got my text editor
open. Now, there's several different types of text editors that you
can use. I like to use Nano some folks like
VI some other things like that. But in
this case, this is what I like to use now is you can see
here. I typed Echo and then hello world. Let's say I want
to make it a little more exciting and happy. So I do hello world
and 2 exclamation points here on the end as you
can see down at the bottom. It gives you some commands that you
can use you typically hold control and hit the
letter so I'll hit control. Oh to write out and I'm
gonna do hello new.
Hit enter.
Select yes.
By hitting Y and then I'll hit Ctrl X to exit the text editor.
And now when I do cat hello new.
We'll see that that's made the change for me. And then
from there I can do a quick bash. Hello new.
And down there. It is. Hello World using that Echo command. So
that's awesome right now.
We know that we're rude.
We'll jump into the the next command here. So I am root. Let's
say that I'm a different user or you're a pin
tester security tester. You've gotten into a system. You want to know what permissions the
user account has. Well, you can use the command
called ID.
And that gives you an output of the permissions that
the account that you're currently logged into
has so that's a good useful thing to have and then
let's say you need to install something. So you notice okay.
I'm the root user. I can install a new programs
applications. But how much space do I have how
much information can I really store on this drive right now? So DF will
show us the free disc space or the disk space
that's free on the system and where everything's at and
it gives you this nice layout here of what's
been used on the right when it's mounted on
as far as the share would have you available space you space
Etc. And so that's a
quick and easy way to do some troubleshooting or check to see how
much free space you have now.
I'm going to introduce you to when I think is one of the most important commands
which is past WD which
is password for short and when we hit enter.
It asks me for a new password. So I'm
going to go ahead and update that.
Oops, looks like we made a mistake. Well, we can't see what we're doing.
Right but that's okay. If I had done that correctly what it
would have done is updated my password and that's very much important
when you inherited system when you
work on a system day to day and you know,
maybe you need to change the password or something of that
nature or you don't want the default credentials on something then
in a Linux environment. You can use that past
WD command and it will allow you to change the
password.
So I know that was a lot of information but those are the
commands that we want to start with and the things that we want to learn to use.
Those are going to be fundamental and helping you to not only edit
files and and produce, you know, better scripts
and things of that nature, but they're going
to give you that foundational tool set to
continue to move deeper and deeper into your understanding of
not just Cali but Linux platforms as a
whole. So now that we've gone through that together, let's do a quick check
on learning which command describes and
shows you how to use other commands.
Now thinking about that.
Remember DF is going to show us disk space
that's free. So DF down here Nano was
our text editor. So that's going to allow me to edit files edit
content makes scripts do things that nature cat
allowed me to pull the output out of
a file and displayed in the terminal like we did Cat hello
new or cat. Hello and that showed us all of the
content of the file.
So the last choice that we have here is man
which is short for manual that shows us. What a
command does a description of the command and gives us a
lot of good information on what we can do with respect to different
switches and things of that nature with those commands that we put after
man. So in summary in this very brief
lesson today, we discussed the following the man
command the cat command Echo Nano ID
DF and password or past WD
for short all of those are important because man
is giving us instructions on how to use commands cat gives
us outputs. If we don't want to open the file or looking at
text editor echo's going to allow us to do some things like
right scripts display information output information.
So it's a great command to have in your tool chest. Nana
was great for editing text files,
but it's not the only text editor out there ideas great
for understanding permissions DF is good for understanding disc
space utilization and where we
might be able to clean some things up and past WD is
fun.
Mental and ensuring that we change our password or
that we don't use default credentials on a system.
So I know that that was brief, but I enjoyed having you
here today and I look forward to seeing you again soon.