2.0 The Terminal (KL)
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
Hello and welcome to this Callie fundamentals lesson. I'm your host, Robert Smith, and I'm excited to be here with you today. So you may be wondering, when are we going to get started? We've talked about downloading. We've talked about some history behind Callie. We talked about all these different things. So when am I going to start learning? How do you actually use
00:20
Callie?
00:21
Well, the good news is, today's lesson involves getting around with the terminal, and we're going to start inching our way into Callie Lennox, The environment, the file systems, things of that nature, and it all starts here.
00:34
So today's lesson objectives are pretty straightforward. I want you to walk away with a few navigation commands, a basic understanding of how to use the terminal, how to get around, how to view files and things of that nature. We're not going to get into anything too technical, but I'm going to give you some tools so that you can start,
00:52
you know, kicking the tires and really understanding
00:55
you know what's there and how to get through everything.
00:58
So what I'm going to do is pull up my lab environment. Now, this is the Cali system in the Host data integrity base lining lab. So if you have access to that lab, you can pull this up and follow along with me. Or, if you've already installed a copy of Callie, you can go from there as well.
01:15
And you know, again, there's some differences, like there might be the terminal button. It's up here
01:19
in this version would maybe be over here on the side and the version that you've previously downloaded. So with those things in mind, let's go ahead and jump into looking at the terminal.
01:30
So it's pretty, pretty straightforward. When you click the terminal button, you get a terminal. Now what you may be wondering is, that's all fine and nice. But where do I begin? How dowe. I understand how to use this? Well, quite simply, one step at a time, right? So when you first open and terminal, the thing I like to do
01:48
is what's called Print Working Directory, or PWD.
01:52
What that does for me, it's it's going to show me my current directory and where I'm at with respect to the file system and things of that nature. So typically, this is where you'll start off unless you were doing something else
02:02
and you may be wondering, Well, that's neat, but
02:06
I'm used to a gooey. I can usually see what's in that directory. So how do I know what's there now? Well, if you use the list command or l s for short,
02:15
you'll notice that I have desktop, which is the desktop folder,
02:17
and that's need as well, right? So with these two commands, you can really understand where you're at within the file system or within this current terminal session, and you can get a listing of everything that's kind of in that current directory that you're working within. So that's pretty easy. Pretty simple.
02:36
Now let's say that you need to go back a directory or you need to go back. Ah, level here. So the command change directory or CD here. You can do that with two dots,
02:49
and now you notice that there's a slight change here
02:53
when I hit l s R P w D first so that we stay on track with that. You'll notice that I don't have anything there. It's just blank.
03:00
But when I do l s list,
03:02
we get ah hole
03:05
different set
03:06
of directories here. Now you'll notice there's route that we were just in there, right?
03:09
So we went back one. And now we're in a directory that is
03:15
again, the kind of root of the whole system here. So now if I need to get into any of these other areas, you might be wondering what? I didn't mean to go here. I need to go back into route. How'd I do that? What? With that same command,
03:30
we can take root
03:32
instead of the two dots.
03:36
And now we're back in the root folder.
03:38
So
03:38
as you start working through and you start, you know, navigating you can go to different areas. So let's do it. Kind of quick here. So seedy. And the two dots
03:47
we're back in that folder again. Or that directory.
03:52
We then do l s. And now we can see something else. Let's say I want to go into the Etc Folder or the E T. C folded. I just do the same thing. C d E T c
04:01
and
04:03
P W d. And now we're working out of that particular area. L s. And there's a lot more here.
04:10
We're moving a little fast on that, but again, it's just some basic navigation command. So print working directory shows us where we're at
04:17
l s shows us the content of that particular directory
04:21
CD allows us to move through or back to certain areas and just say that I'm ready to get back to the root folder that I was originally in.
04:30
I can just type CD and hit, enter
04:32
and someone lamb back where I started. Very nice. So we've entered all of these different things. We've gotten all this different outputting We're starting to get a bit of a mess here. So the next thing that I would like to show you is called clear.
04:45
So when I type clear and hit enter,
04:47
it gets rid of all that mess, and I've got a nice, clean starting point.
04:51
So we were talking earlier about the different directories and what not? And in your root directory, you have the desktop. So if you want to, you can hit CD
05:02
type desktop
05:04
and them were there.
05:06
Now keep in mind that if you want to quickly finish the name of something, or maybe you're having some confusion on remembering like, let's say, that I'm back in that folder or that directory
05:16
and I want to
05:18
maybe get to desktop or something like that. Now check this out. If I do see D desktop and Hit Tab
05:26
noticed that it doesn't go anywhere. It's not giving me that completion,
05:30
but what I do
05:31
again and hit Tam, it finishes. Why is that?
05:34
Well, keep in mind with Lennox and Callie and any of the distributions, really, their case sensitive. So if you type a lower case letter, but the directory or command or whatever the case may be, starts with a capital letter, it's not going to auto complete or execute accordingly. So keep in mind that that
05:53
everything here is going to be case sensitive and you want to be mindful of that is your working.
05:58
So now we're in our desktop directory, and that's great. So when I do my analyst again,
06:02
Oh wow, you'll notice that the stuff that we have over here is now showing up in here minus the computer icon that we have over here. But we've got our read not t X T file here.
06:16
We've got this. Make that T X T. That's not showing up.
06:19
So
06:20
now that we're here, let's say I want to be able to see what's in that t X t found without opening. I mean, yeah, you can double click and it opens. Great. You can see it. But if we're working through and we're not navigating via the gooey and I want to read what's in that text file, Aiken do what's called cat it short from Canton eight. And I could do that. Read
06:41
dot t x t. I just used have their the auto complete.
06:44
And look, it shows the text that's in the file. So this is a quick way that you can read that content of that file and see what's in it.
06:51
Now, let's say that I want to get rid of that weird make dot t x t. Well, I can use the moon, uh, remove command,
07:00
and then I can start typing the name of that,
07:04
and suddenly that that completes there's no error there. So we do. L s again.
07:10
And as you'll notice make dot t x t is no longer here so that our am allowed me to remove that Make not t X t
07:18
folder. I'm sorry text file.
07:21
All right, so now
07:24
let's say that I want to, um, go ahead and
07:30
make another text file or something like that. So you can also do cat, which allowed us to read.
07:36
And I can do a quick, uh, kind of care it here,
07:42
and it will output to a text or a text file. And so in this case, what I can do is Aiken, do test
07:48
dot t x t.
07:51
And suddenly that creates a text file pretty quick on the desktop there. So I'm gonna hit control C just to back out,
07:59
and now I have an empty text file here,
08:01
so that's pretty neat stuff. That's a quick way to create a text file. Quickly tow read a text file. Quick way to remove one.
08:09
Let's say now that I want to make a folder or a directory on the desktop. So in this case, what I can do is in Kedar or make directory,
08:18
and then I couldn't do Let's just say I want to call it a test directory.
08:26
Suddenly I've got
08:28
folder over here on the desktop name test.
08:31
So now when I look,
08:33
you'll see that test shows up here in blue. Now we'll talk about these colors and all those things in the next lesson, so don't get hung up on the color just yet. We'll explain all of that here soon.
08:43
Now, let's say that I want to move my test dot t x t to the test folder that I just created. So what I can do is I can type envy for move
08:56
that test,
08:56
not t X t,
08:58
and then I'm going to move it to test
09:03
suddenly disappears. Right
09:07
no longer there.
09:07
Now,
09:09
if I do my CD to test
09:13
l s four list suddenly there it is.
09:16
So
09:16
pretty neat stuff. I mean, not not a lot to it. Once we get some of those basic commands down and were able to, um, you know, kind of cleanly navigate and make a few files indecent things. You're really ready to jump in and start working. So good job on that stuff. So you might be wondering while you did. Ah, lot.
09:35
How do I know what I've done this? For? How I don't know what steps are taken. What if I want to see some things and I did earlier, but I can't remember.
09:41
Well,
09:41
you can use the history command
09:45
and that cleanly this out. Everything that we've done in this terminal
09:48
session here
09:50
and then from there,
09:52
let's say we're done
09:54
and we can hit exit and it closes the terminal.
09:56
So with that in mind, start doing some navigation. Start working through the terminal on your own and practice in some of those commands. And before you know it, you'll be an expert. Now,
10:07
let's do a quick check on learning you didn't think you were getting away without one of those, did you? So what command allows you to move a file from one directory to another? Well, with these in mind,
10:18
you may be thinking well
10:22
in the movie Makes sense, right? That would be correct. Keep in mind that our EMP was to remove files or content
10:30
in Cade ERM make directory was to make a folder or directory, unless was toe list and move was to move files from one directory to another. So in summary,
10:41
you should have gotten a very high level understanding on how to navigate through Callie's directories, how to create manipulates and files at a high level and really, how much fun you're gonna have doing this stuff and working through the Cali distribution or any distribution of Linux. T be honest on learning these commands. So great job.
11:01
Thank you for your time today. And I look forward to seeing you again here soon.
Up Next
Similar Content