WEBVTT - This file was automatically generated by VIMEO

0
00:00:00.200 --> 00:00:03.600
Hello and welcome to this. Cali fundamentals lesson.

1
00:00:03.600 --> 00:00:06.400
 I'm your host Robert Smith, and I'm excited to

2
00:00:06.400 --> 00:00:09.900
 be here with you today. So you may be wondering when

3
00:00:09.900 --> 00:00:13.200
 are we going to get started? We've talked about downloading we've

4
00:00:12.200 --> 00:00:15.600
 talked about some history behind Cali we've

5
00:00:15.600 --> 00:00:18.400
 talked about all these different things. So when am I going to start learning

6
00:00:18.400 --> 00:00:21.700
 how to actually use Cali? Well, the

7
00:00:21.700 --> 00:00:24.700
 good news is today's lesson involves getting

8
00:00:24.700 --> 00:00:27.400
 around with the terminal and we're going to start inching our

9
00:00:27.400 --> 00:00:30.400
 way into Cali Linux the environment the file

10
00:00:30.400 --> 00:00:33.800
 systems things of that nature and it all starts here.

11
00:00:33.800 --> 00:00:36.200
 So today's lesson objectives are

12
00:00:36.200 --> 00:00:40.500
 pretty straightforward. I want you to walk away with a few navigation commands

13
00:00:39.500 --> 00:00:42.700
 a basic understanding of of how

14
00:00:42.700 --> 00:00:45.300
 to use the terminal how to get around how to

15
00:00:45.300 --> 00:00:48.700
 view files and things of that nature. We're not going to get into anything too

16
00:00:48.700 --> 00:00:51.500
 technical, but I'm going to give you some tools so

17
00:00:51.500 --> 00:00:54.600
 that you can start, you know, kick in the tires and really understanding,

18
00:00:54.600 --> 00:00:57.200
 you know, what's there and how to get through everything?

19
00:00:58.100 --> 00:01:01.400
So what I'm going to do is pull up my lab

20
00:01:01.400 --> 00:01:04.700
 environment. Now, this is the Cali system

21
00:01:04.700 --> 00:01:07.500
 in the host data Integrity baselining lab.

22
00:01:07.500 --> 00:01:10.200
 So if you have access to that lab you can pull

23
00:01:10.200 --> 00:01:13.400
 this up and follow along with me or if you've already installed

24
00:01:13.400 --> 00:01:16.300
 a copy of Cali you can go from there as well. And you

25
00:01:16.300 --> 00:01:19.600
 know again, there's some differences like there might be the terminal button that's

26
00:01:19.600 --> 00:01:22.800
 up here in this version would maybe

27
00:01:22.800 --> 00:01:25.800
 be over here on the side and the version that you've previously downloaded.

28
00:01:25.800 --> 00:01:28.200
 So with those things in mind, let's go

29
00:01:28.200 --> 00:01:31.600
 ahead and jump into looking at the terminal so it's pretty pretty

30
00:01:31.600 --> 00:01:34.700
 straightforward when you click the terminal button you

31
00:01:34.700 --> 00:01:37.200
 get a terminal now what you may be

32
00:01:37.200 --> 00:01:40.300
 wondering is that's all fine and nice, but where do I begin? How

33
00:01:40.300 --> 00:01:43.500
 do I understand how to use this? Well, quite simply one step at

34
00:01:43.500 --> 00:01:47.100
 a time, right? So when you first open a

35
00:01:46.100 --> 00:01:49.500
 terminal the thing I like to do is what's called

36
00:01:49.500 --> 00:01:52.800
 print working directory or PWD what that

37
00:01:52.800 --> 00:01:55.500
 does for me? It's it's going to show me my current directory

38
00:01:55.500 --> 00:01:57.900
 and where I'm at with respect to the

39
00:01:58.100 --> 00:02:01.400
File system and thinks of that nature. So typically this is where you'll

40
00:02:01.400 --> 00:02:03.000
 start off unless you were doing something else.

41
00:02:03.700 --> 00:02:06.900
And you may be wondering. Well, that's neat, but I'm used

42
00:02:06.900 --> 00:02:09.300
 to a gooey. I can usually see what's in that directory. So,

43
00:02:09.300 --> 00:02:12.300
 how do I know? What's there now? Well if you use the

44
00:02:12.300 --> 00:02:14.100
 list command or LS for short

45
00:02:15.300 --> 00:02:19.100
You'll notice that I have desktop which is the desktop folder and

46
00:02:18.100 --> 00:02:21.500
 that's neat as well. Right? So with these

47
00:02:21.500 --> 00:02:24.200
 two commands, you can really understand where you're

48
00:02:24.200 --> 00:02:27.400
 at within the file system or within this current terminal

49
00:02:27.400 --> 00:02:30.500
 session and you can get a listing of everything that's kind

50
00:02:30.500 --> 00:02:33.400
 of in that current directory that you're working within

51
00:02:33.400 --> 00:02:35.400
 so that's pretty easy pretty simple.

52
00:02:36.300 --> 00:02:39.600
Now let's say that you need to go back

53
00:02:39.600 --> 00:02:42.600
 a directory or you need to go back a level

54
00:02:42.600 --> 00:02:46.100
 here. So the command change directory or

55
00:02:45.100 --> 00:02:48.200
 CD here. You can do that

56
00:02:48.200 --> 00:02:51.500
 with two dots and now you notice that

57
00:02:51.500 --> 00:02:52.800
 there's a slight change here.

58
00:02:53.900 --> 00:02:56.300
When I hit LS or PWD first so

59
00:02:56.300 --> 00:02:59.300
 that we stay on track with that. You'll notice that I don't have anything there.

60
00:02:59.300 --> 00:03:02.100
 It's just blank but when I do LS list

61
00:03:03.400 --> 00:03:06.600
We get a whole different set of

62
00:03:06.600 --> 00:03:09.300
 directories here. Now, you'll notice there's root that we

63
00:03:09.300 --> 00:03:12.600
 were just in there, right? So we went back one

64
00:03:12.600 --> 00:03:15.400
 and now we're in a directory that

65
00:03:15.400 --> 00:03:15.500
 is

66
00:03:16.600 --> 00:03:19.500
Again, the kind of root of the whole system

67
00:03:19.500 --> 00:03:22.600
 here. So now if I need to get into any of

68
00:03:22.600 --> 00:03:25.800
 these other areas, you might be wondering what I didn't

69
00:03:25.800 --> 00:03:28.200
 mean to go here. I need to go back into root. How

70
00:03:28.200 --> 00:03:30.200
 do I do that? Well with that same command

71
00:03:31.300 --> 00:03:32.600
we can type root.

72
00:03:33.300 --> 00:03:34.900
instead of the two dots

73
00:03:36.600 --> 00:03:38.200
and now we're back in the root folder.

74
00:03:38.900 --> 00:03:41.400
So as you start working through

75
00:03:41.400 --> 00:03:44.200
 and you start, you know, navigating you can go

76
00:03:44.200 --> 00:03:47.300
 to different areas. So let's do it kind of quick here. So CD and

77
00:03:47.300 --> 00:03:48.000
 the two dots

78
00:03:48.800 --> 00:03:51.600
We're back in that folder again or that directory.

79
00:03:51.600 --> 00:03:54.500
 We then do LS and now we can see something else.

80
00:03:54.500 --> 00:03:57.500
 Let's say I want to go into the Etsy

81
00:03:57.500 --> 00:04:01.500
 folder or the ETC folder. I just do the same thing CD Etc.

82
00:04:02.600 --> 00:04:02.900
and

83
00:04:04.400 --> 00:04:07.600
PWD and now we're working out of that particular area

84
00:04:07.600 --> 00:04:09.400
 LS and there's a lot more here.

85
00:04:10.300 --> 00:04:13.600
We're moving a little fast on that. But again, it's just

86
00:04:13.600 --> 00:04:16.700
 some basic navigation commands. So print working directory

87
00:04:16.700 --> 00:04:17.600
 shows us where we're at.

88
00:04:18.500 --> 00:04:21.800
LS shows us the content of that particular directory.

89
00:04:22.700 --> 00:04:25.500
CD allows us to move through or back to certain

90
00:04:25.500 --> 00:04:28.100
 areas and just say that I'm ready to get back

91
00:04:28.100 --> 00:04:31.100
 to the root folder that I was originally in. I can just

92
00:04:31.100 --> 00:04:32.500
 type CD and hit enter.

93
00:04:33.800 --> 00:04:36.500
And suddenly I'm back where I started very nice.

94
00:04:36.500 --> 00:04:39.300
 So we've entered all of these different things and we've

95
00:04:39.300 --> 00:04:42.700
 gotten all this different output and we're starting to get a bit of a mess here. So the

96
00:04:42.700 --> 00:04:45.900
 next thing that I I would like to show you is called clear. So

97
00:04:45.900 --> 00:04:47.400
 when I take clear and hit enter,

98
00:04:48.300 --> 00:04:51.700
It gets rid of all that mess and now I've got a nice clean starting

99
00:04:51.700 --> 00:04:54.400
 point. So we were talking earlier about

100
00:04:54.400 --> 00:04:57.400
 the different directories and whatnot. And in your

101
00:04:57.400 --> 00:05:00.600
 root directory you have the desktop. So if you

102
00:05:00.600 --> 00:05:02.000
 want to you can hit CD.

103
00:05:03.200 --> 00:05:04.100
type desktop

104
00:05:05.600 --> 00:05:08.100
and bam, we're there now keep in mind

105
00:05:08.100 --> 00:05:11.500
 that if you want to quickly finish the name of something or

106
00:05:11.500 --> 00:05:14.200
 maybe you're having some confusion on remembering like let's say

107
00:05:14.200 --> 00:05:17.700
 that I'm back in that folder or that directory and I

108
00:05:17.700 --> 00:05:18.600
 want to

109
00:05:19.800 --> 00:05:22.200
Maybe get to desktop or something like that now check

110
00:05:22.200 --> 00:05:25.100
 this out if I do CD desktop and

111
00:05:25.100 --> 00:05:25.600
 hit tab.

112
00:05:26.500 --> 00:05:30.400
Notice that it doesn't go anywhere. It's not giving me that completion. But

113
00:05:29.400 --> 00:05:30.900
 when I do.

114
00:05:32.200 --> 00:05:35.800
Again in hit tab it finishes. Why is that? Well,

115
00:05:35.800 --> 00:05:38.300
 keep in mind with Linux and and Callie and

116
00:05:38.300 --> 00:05:41.700
 any of the distributions really their case sensitive. So if

117
00:05:41.700 --> 00:05:44.400
 you type a lowercase letter, but the

118
00:05:44.400 --> 00:05:47.400
 directory or command or whatever the case may be starts with

119
00:05:47.400 --> 00:05:50.400
 a capital letter. It's not going to autocomplete or

120
00:05:50.400 --> 00:05:53.200
 execute accordingly. So keep in mind that that

121
00:05:53.200 --> 00:05:56.300
 everything here is going to be case sensitive and you'll want

122
00:05:56.300 --> 00:05:59.400
 to be mindful of that as you're working. So now we're in our desktop

123
00:05:59.400 --> 00:06:02.700
 directory and and that's great. So when I do my LS again,

124
00:06:03.800 --> 00:06:06.100
Oh, wow, you'll notice that the stuff that we

125
00:06:06.100 --> 00:06:09.500
 have over here is now showing up in here minus the

126
00:06:09.500 --> 00:06:12.600
 computer icon that we have over here, but we've

127
00:06:12.600 --> 00:06:15.500
 got our read not txt

128
00:06:15.500 --> 00:06:16.100
 file here.

129
00:06:17.100 --> 00:06:20.700
We've got this make dot txt. That's not showing up. So.

130
00:06:21.600 --> 00:06:24.100
Now that we're here, let's say I want to be able

131
00:06:24.100 --> 00:06:27.300
 to see what's in that txt file without opening. I mean, yeah, you

132
00:06:27.300 --> 00:06:30.700
 can double click and it opens great. You can see it but if

133
00:06:30.700 --> 00:06:33.400
 we're working through and and we're not navigating via

134
00:06:33.400 --> 00:06:36.100
 the GUI and I want to read what's in that text file. I can

135
00:06:36.100 --> 00:06:40.000
 do what's called cat. It's short from concatenate and

136
00:06:39.400 --> 00:06:42.400
 I can do that read dot txt.

137
00:06:42.400 --> 00:06:45.600
 I just use tab there to auto complete and look it

138
00:06:45.600 --> 00:06:48.600
 shows the text that's in the file. So this is a quick way that you

139
00:06:48.600 --> 00:06:51.000
 can read that content of that

140
00:06:51.400 --> 00:06:54.100
 file and see what's in it. Now. Let's say that

141
00:06:54.100 --> 00:06:57.700
 I want to get rid of that weird makeup txt. Well, I

142
00:06:57.700 --> 00:07:00.100
 can use the move the remove command.

143
00:07:01.400 --> 00:07:03.900
And then I can start typing the name of that.

144
00:07:05.200 --> 00:07:08.100
And suddenly that that completes there's no error there. So

145
00:07:08.100 --> 00:07:09.000
 we do LS again.

146
00:07:10.100 --> 00:07:13.300
And as you'll notice make dot txt is

147
00:07:13.300 --> 00:07:16.700
 no longer here so that RM allowed me to remove that

148
00:07:16.700 --> 00:07:20.200
 make not txt folder or

149
00:07:20.200 --> 00:07:21.400
 I'm sorry text file.

150
00:07:22.200 --> 00:07:23.000
All right. So now

151
00:07:24.100 --> 00:07:28.500
let's say that I want to go ahead

152
00:07:28.500 --> 00:07:28.700
 and

153
00:07:30.600 --> 00:07:33.100
make another text file or something like that. So you

154
00:07:33.100 --> 00:07:36.300
 can also do cat which allowed

155
00:07:36.300 --> 00:07:36.700
 us to read.

156
00:07:37.700 --> 00:07:40.600
And I can do a quick kind of

157
00:07:40.600 --> 00:07:41.300
 carrot here.

158
00:07:42.500 --> 00:07:45.800
And it will output to a text or a

159
00:07:45.800 --> 00:07:48.000
 text file and so in this case, what I can do is I can

160
00:07:48.200 --> 00:07:50.100
 do test Dot txt.

161
00:07:52.100 --> 00:07:55.400
And suddenly that creates a text file pretty quick on the desktop there.

162
00:07:55.400 --> 00:07:58.400
 So now I'm going to hit control C just to back

163
00:07:58.400 --> 00:07:58.600
 out.

164
00:07:59.500 --> 00:08:01.400
And now I have an empty text file here.

165
00:08:02.700 --> 00:08:05.000
So that's pretty neat stuff. That's a quick way to

166
00:08:05.300 --> 00:08:08.500
 create a text file quick way to read a text file quick way

167
00:08:08.500 --> 00:08:11.500
 to remove one. Let's say now that I want to make

168
00:08:11.500 --> 00:08:14.600
 a folder or a directory on the desktop.

169
00:08:14.600 --> 00:08:18.400
 So in this case, what I can do is mkder or

170
00:08:17.400 --> 00:08:20.100
 make directory and then I

171
00:08:20.100 --> 00:08:24.100
 can do let's just say I want to call it test directory.

172
00:08:26.100 --> 00:08:29.200
Suddenly I've got folder over

173
00:08:29.200 --> 00:08:30.600
 here on the desktop named test.

174
00:08:31.300 --> 00:08:32.900
so now when I look

175
00:08:33.600 --> 00:08:36.300
You'll see that Test shows up here in blue now. We'll talk about

176
00:08:36.300 --> 00:08:39.600
 these colors and all those things in the next lesson. So

177
00:08:39.600 --> 00:08:42.300
 don't get hung up on the color just yet. We'll explain

178
00:08:42.300 --> 00:08:43.300
 all of that here soon.

179
00:08:44.300 --> 00:08:48.000
Now let's say that I want to move my test dot txt to

180
00:08:47.600 --> 00:08:50.600
 the test folder that

181
00:08:50.600 --> 00:08:53.300
 I just created. So what I can do is I can

182
00:08:53.300 --> 00:08:54.600
 type MV for move.

183
00:08:56.400 --> 00:08:58.400
That test Dot txt.

184
00:08:59.600 --> 00:09:01.900
And then I'm going to move it to test.

185
00:09:04.500 --> 00:09:05.800
Suddenly it disappears, right?

186
00:09:07.200 --> 00:09:10.100
no longer there now if I do my

187
00:09:10.100 --> 00:09:11.800
 CD to test

188
00:09:13.400 --> 00:09:16.200
LS for list suddenly, there. It

189
00:09:16.200 --> 00:09:19.100
 is. So pretty neat stuff. I mean

190
00:09:19.100 --> 00:09:22.400
 not not a lot to it. Once we get some of those basic commands

191
00:09:22.400 --> 00:09:25.700
 down and we're able to you know,

192
00:09:25.700 --> 00:09:28.100
 kind of cleanly navigate and make a few

193
00:09:28.100 --> 00:09:31.800
 files and do some things you're really ready to jump in and start working so good

194
00:09:31.800 --> 00:09:34.300
 job on that stuff. So you might be wondering why

195
00:09:34.300 --> 00:09:37.300
 you did a lot. How do I know what I've done this far? How

196
00:09:37.300 --> 00:09:40.500
 do I know what steps I've taken what if I want to see some things that I did earlier, but

197
00:09:40.500 --> 00:09:43.200
 I can't remember. Well, you can use

198
00:09:43.200 --> 00:09:44.000
 the history command.

199
00:09:45.300 --> 00:09:47.900
And that cleanly lists out everything that we've done in this terminal.

200
00:09:48.800 --> 00:09:49.300
Session here.

201
00:09:51.100 --> 00:09:51.600
And then from there.

202
00:09:52.700 --> 00:09:53.500
Let's say we're done.

203
00:09:54.400 --> 00:09:56.800
And we can hit exit and it closes the terminal.

204
00:09:57.800 --> 00:10:00.500
So with that in mind start doing some

205
00:10:00.500 --> 00:10:03.800
 navigation start working through the terminal on your own and practice

206
00:10:03.800 --> 00:10:06.600
 in some of those commands and before you know, it you'll be

207
00:10:06.600 --> 00:10:09.500
 an expert now. Let's do a quick check on

208
00:10:09.500 --> 00:10:12.300
 learning. You didn't think you were getting away without one of those did you so

209
00:10:12.300 --> 00:10:15.300
 what command allows you to move a file from One Directory to

210
00:10:15.300 --> 00:10:18.100
 another well with these in mind.

211
00:10:19.600 --> 00:10:23.000
You may be thinking well MB move

212
00:10:22.400 --> 00:10:25.500
 makes sense, right? That would be correct. Keep

213
00:10:25.500 --> 00:10:28.700
 in mind that RM was to remove files

214
00:10:28.700 --> 00:10:31.700
 or content in kurum

215
00:10:31.700 --> 00:10:34.400
 make directory was to make a folder or a directory

216
00:10:34.400 --> 00:10:37.500
 LS was to list and move was to

217
00:10:37.500 --> 00:10:41.300
 move files from one directory to another. So in

218
00:10:40.300 --> 00:10:43.300
 summary you should have gotten a

219
00:10:43.300 --> 00:10:46.300
 very high level understanding on how to navigate through

220
00:10:46.300 --> 00:10:49.800
 Callie's directories how to create manipulate some

221
00:10:49.800 --> 00:10:52.400
 files in a high level and really how much fun you're

222
00:10:52.400 --> 00:10:55.500
 gonna have doing this stuff and working through the county distribution

223
00:10:55.500 --> 00:10:59.200
 or any distribution of Linux to to be honest and learning

224
00:10:58.200 --> 00:11:01.400
 these commands so great job. Thank you

225
00:11:01.400 --> 00:11:04.200
 for your time today and I look forward to seeing you again here

226
00:11:04.200 --> 00:11:04.400
 soon.
