1
00:00:00,180 --> 00:00:04,650
All right, so in this video, I'm going to run through some of the essential terminal commands for

2
00:00:04,650 --> 00:00:07,660
navigation, for moving around on your machine.

3
00:00:07,920 --> 00:00:09,870
We need this in order to work with it.

4
00:00:09,960 --> 00:00:17,160
If you already know these commands, things like Ellyse and P and C, D, if you know those commands,

5
00:00:17,160 --> 00:00:18,570
feel free to skip this, of course.

6
00:00:18,960 --> 00:00:21,750
But if you don't, I'm going to run through this quickly.

7
00:00:21,750 --> 00:00:27,030
But also, I recommend you take some time to practice and just keep a reference or a cheat sheet up

8
00:00:27,030 --> 00:00:31,110
that you can look back at, because I'll be using a lot of these commands throughout the course, but

9
00:00:31,110 --> 00:00:32,700
nothing super difficult, I promise.

10
00:00:33,030 --> 00:00:34,450
The hardest part is just remembering them.

11
00:00:35,010 --> 00:00:37,830
OK, so I've got my Mac window here.

12
00:00:37,830 --> 00:00:40,640
I've got my terminal open, just the terminal app on Mac.

13
00:00:40,650 --> 00:00:45,630
So if you're following along with a Mac, you'll look at the screen and then occasionally when there

14
00:00:45,630 --> 00:00:50,870
is a small deviation or difference on a Windows machine, here is my Windows terminal.

15
00:00:50,880 --> 00:00:54,020
This is the Basche or Get Bash show that I've opened up.

16
00:00:54,240 --> 00:00:57,780
So if you install that on a Windows machine, it will look something like this.

17
00:00:58,140 --> 00:01:00,590
So the first command we'll talk about is called LC.

18
00:01:00,720 --> 00:01:06,240
It is short for list list the contents of a folder or of the current directory.

19
00:01:06,990 --> 00:01:12,780
So if you type Ellas into your terminal and you hit enter wherever you currently are and we haven't

20
00:01:12,780 --> 00:01:13,800
learned how to move yet.

21
00:01:13,950 --> 00:01:18,900
So we'll talk about where we currently are, wherever that location is, we will see the contents printed

22
00:01:18,900 --> 00:01:19,050
out.

23
00:01:19,770 --> 00:01:25,740
So in this case, I'm in the folder that contains some JavaScript files, HTML file access file, Alamo's

24
00:01:25,740 --> 00:01:28,350
Python file, a folder called Secret.

25
00:01:28,530 --> 00:01:30,870
That is what's printed out at least in this slide.

26
00:01:31,560 --> 00:01:34,740
So if I try it over here, this is a brand new terminal window.

27
00:01:34,740 --> 00:01:35,790
I just made a new tab.

28
00:01:35,790 --> 00:01:36,750
I haven't moved.

29
00:01:36,750 --> 00:01:38,190
I haven't talked about moving.

30
00:01:39,090 --> 00:01:40,050
Where am I?

31
00:01:40,500 --> 00:01:47,070
Well, I'm at a location called the Home Directory, and it's abbreviated or it's symbolized by this

32
00:01:47,070 --> 00:01:48,060
Tildy character.

33
00:01:48,390 --> 00:01:51,150
You can find that above a tab key on most keyboards.

34
00:01:51,420 --> 00:01:55,230
Anyway, my home directory contains a lot of a lot of things.

35
00:01:55,230 --> 00:01:58,800
If I hit Ellyse, you won't see all of these.

36
00:01:59,160 --> 00:02:05,400
Some of them are standard on a Mac like applications, desktop documents, downloads, public pictures.

37
00:02:05,610 --> 00:02:07,440
Some of them are my folders.

38
00:02:07,440 --> 00:02:11,580
I've made like, you know, get demo and get stuff.

39
00:02:12,450 --> 00:02:13,080
What else?

40
00:02:13,080 --> 00:02:13,680
Pets.

41
00:02:15,330 --> 00:02:16,330
Terminal demo.

42
00:02:16,410 --> 00:02:18,880
Those are my folders I've made anyway.

43
00:02:18,900 --> 00:02:22,710
You'll see something, right, you'll see the contents of your home directory.

44
00:02:22,980 --> 00:02:25,380
And if you're on a Windows machine, we can do the same thing.

45
00:02:25,390 --> 00:02:26,310
You can get Basche.

46
00:02:26,790 --> 00:02:32,580
So Ellas now I see different things because there are different files and folders on a Windows machine,

47
00:02:33,150 --> 00:02:35,820
but I'm in the same location on this Windows machine.

48
00:02:36,120 --> 00:02:38,370
Tildy, that is my home directory.

49
00:02:39,120 --> 00:02:41,460
All right, so we can't move right now.

50
00:02:41,490 --> 00:02:47,490
We're just simply looking at files and folders in one location and I'm going to show you a command that

51
00:02:47,490 --> 00:02:50,010
I don't have a slide for on a Mac.

52
00:02:50,010 --> 00:02:51,090
The command is open.

53
00:02:51,360 --> 00:02:57,210
If we type open dot, it's actually going to open up in Finder on a Mac.

54
00:02:57,210 --> 00:03:01,390
The file explorer is called Finder, the same directory where I currently am.

55
00:03:01,740 --> 00:03:03,360
So this is my home directory.

56
00:03:03,600 --> 00:03:08,160
And if you've never used the terminal, you're probably familiar with this sort of navigation, right?

57
00:03:08,730 --> 00:03:11,700
If I want to look at, you know, my courses folder, I double click.

58
00:03:12,360 --> 00:03:14,890
If I want to go back, I click the back arrow.

59
00:03:16,200 --> 00:03:19,270
That's kind of the basic navigation without the terminal.

60
00:03:19,650 --> 00:03:23,070
Now, if I'm on a Windows machine, the open command actually does not work.

61
00:03:24,630 --> 00:03:29,890
It tells me command not found, but instead I can do start dot.

62
00:03:30,150 --> 00:03:32,820
This is really the one major difference I can think of so far.

63
00:03:33,450 --> 00:03:36,240
And then this opens up the Windows equivalent of Finder.

64
00:03:36,240 --> 00:03:38,850
I think it's called File is a file explorer.

65
00:03:39,310 --> 00:03:41,760
Not much of a Windows user anyway.

66
00:03:41,760 --> 00:03:45,720
I probably shouldn't admit that you can see the folders and files that are listed here.

67
00:03:45,990 --> 00:03:47,820
So we've got pictures as an example.

68
00:03:48,180 --> 00:03:50,310
And if I do start Dot, I can see.

69
00:03:50,310 --> 00:03:51,660
All right, here's the pictures folder.

70
00:03:51,960 --> 00:03:55,110
We have videos, there's a videos folder there.

71
00:03:55,530 --> 00:03:59,070
So all of those things that we see represented here are also here.

72
00:03:59,220 --> 00:04:03,540
It's just two different ways of interacting or viewing the contents of this folder.

73
00:04:04,260 --> 00:04:04,710
All right.

74
00:04:05,070 --> 00:04:06,900
So that's Ellyse on its own.

75
00:04:07,110 --> 00:04:08,670
Just ls nothing.

76
00:04:08,670 --> 00:04:12,600
Afterwards you hit enter and it shows us what it's in the current directory.

77
00:04:13,020 --> 00:04:20,160
But I can also use us on a folder so I could say, you know what's inside this pets' folder and all

78
00:04:20,160 --> 00:04:22,200
I need to do is reference the path.

79
00:04:22,530 --> 00:04:24,840
So the name in this case is Pets'.

80
00:04:24,840 --> 00:04:25,920
So Elspeth's.

81
00:04:26,990 --> 00:04:32,860
And that's what's inside that PED's folder, and I can actually open that folder, too, if I just do

82
00:04:32,870 --> 00:04:37,220
open pets and it opened on my other screen.

83
00:04:37,230 --> 00:04:38,080
Let me drag this up.

84
00:04:38,240 --> 00:04:38,800
There we are.

85
00:04:38,840 --> 00:04:41,780
You can see those content cats, chickens, hamsters and so on.

86
00:04:42,410 --> 00:04:42,920
All right.

87
00:04:43,490 --> 00:04:45,130
I'll do that on a Windows machine as well.

88
00:04:45,140 --> 00:04:52,400
Let's say I want to know what is inside of this gett course directory so I can do Ellas get and I need

89
00:04:52,400 --> 00:04:57,920
to spell it correctly, but I can also hit tab to autocomplete and it looks like it's an empty directory.

90
00:04:57,950 --> 00:04:59,640
Well that's my fault for picking that one.

91
00:04:59,990 --> 00:05:00,800
Let's try another one.

92
00:05:00,950 --> 00:05:04,130
How about what is in gets stuff.

93
00:05:04,280 --> 00:05:09,350
I don't know, I don't remember making that but we'll try to get stuff.

94
00:05:10,230 --> 00:05:15,680
OK, there's one folder called Demo, not very exciting but hopefully you get the idea here.

95
00:05:15,710 --> 00:05:18,120
We can use less with nothing afterwards.

96
00:05:18,680 --> 00:05:20,450
Also, there's a command called the Clear.

97
00:05:20,460 --> 00:05:24,800
I'll just show because I'll be using this kind of annoys me when I have a lot of stuff in my terminal.

98
00:05:25,550 --> 00:05:26,390
So that goes away.

99
00:05:27,380 --> 00:05:29,180
So that has nothing to do with navigation.

100
00:05:29,870 --> 00:05:33,530
So I was everything else on its own will list the contents of our current directory.

101
00:05:33,860 --> 00:05:38,510
Ellyse followed by the name of a directory like I could do pets.

102
00:05:38,540 --> 00:05:41,390
As I've shown you, I see the files and pets.

103
00:05:41,600 --> 00:05:43,160
It's a bunch of folders actually.

104
00:05:43,460 --> 00:05:50,120
And if I wanted to look at, let's say, the goats directory or how about the cats directory, I can't

105
00:05:50,120 --> 00:05:54,440
do ls cats because there is no cats directory where I currently am.

106
00:05:54,770 --> 00:05:56,860
Remember, this is what I see, right.

107
00:05:56,870 --> 00:06:00,530
I currently interviewing or I'm inside this home directory.

108
00:06:00,530 --> 00:06:01,520
That's what I see when I type.

109
00:06:01,520 --> 00:06:05,810
I was I have to type out the path to access cats.

110
00:06:06,080 --> 00:06:07,370
It's inside of pets.

111
00:06:07,670 --> 00:06:11,000
So it's actually this allows pets, cats.

112
00:06:12,120 --> 00:06:12,780
And there we are.

113
00:06:12,910 --> 00:06:13,840
It's one of my cats.

114
00:06:13,860 --> 00:06:17,450
Her name is Blue Blue Steel and that's all.

115
00:06:17,460 --> 00:06:21,430
I'll show you what else we can reference these paths where we chain things together.

116
00:06:22,170 --> 00:06:24,150
Anyway, the next command, I'll show you.

117
00:06:24,420 --> 00:06:25,280
It's pretty simple.

118
00:06:25,680 --> 00:06:29,520
It's called P W.D. for print working directory.

119
00:06:29,880 --> 00:06:32,400
And what this will do, it's very simple.

120
00:06:32,460 --> 00:06:34,470
It just print out your current location.

121
00:06:34,650 --> 00:06:37,660
It prints out the path to where you currently are.

122
00:06:38,130 --> 00:06:39,660
So we haven't been able to move.

123
00:06:39,660 --> 00:06:39,900
Right.

124
00:06:39,900 --> 00:06:41,760
We haven't changed locations yet.

125
00:06:42,510 --> 00:06:46,020
We've been able to peek into other folders with less.

126
00:06:46,290 --> 00:06:53,160
But P W.D. is if I just type it like that, it's going to give me the exact location where I am right

127
00:06:53,160 --> 00:06:53,490
now.

128
00:06:53,790 --> 00:06:56,370
So the home directory here is just short.

129
00:06:56,370 --> 00:07:00,000
That little Tildy is a short way referencing this location.

130
00:07:00,480 --> 00:07:02,550
My user on here, it's called Cold Steel.

131
00:07:02,850 --> 00:07:04,320
That is where I currently am.

132
00:07:04,710 --> 00:07:09,630
But if I'm on my Windows machine, it's going to it's quite different and similar, but it's different

133
00:07:10,050 --> 00:07:12,800
because on a Windows machine, we've got this C drive, right?

134
00:07:12,810 --> 00:07:18,410
So C slash users slash cold steel and that's obviously going to be your username.

135
00:07:18,930 --> 00:07:20,460
So probably not cold steel.

136
00:07:20,970 --> 00:07:23,130
So that is where we currently are.

137
00:07:23,190 --> 00:07:25,680
If I type D, that's my location.

138
00:07:25,920 --> 00:07:30,510
And that brings me to our next command, which is code for change directory.

139
00:07:30,870 --> 00:07:32,430
This is how we move around.

140
00:07:32,760 --> 00:07:38,460
It's the equivalent if I do open, it's the equivalent of double clicking on one of these things.

141
00:07:38,460 --> 00:07:38,740
Right.

142
00:07:38,760 --> 00:07:40,200
And moving between folders.

143
00:07:40,200 --> 00:07:42,810
I'm now in a different folder you could think of.

144
00:07:42,930 --> 00:07:44,310
This is my current directory.

145
00:07:44,560 --> 00:07:49,980
Now, if I click here, this is my current directory and if I click in pictures, that's my current

146
00:07:49,980 --> 00:07:52,230
directory and there's one of my chickens, Stoebe Chicks.

147
00:07:52,560 --> 00:07:53,000
All right.

148
00:07:53,460 --> 00:07:58,440
So if I want to change directories from the terminal, which I'll be doing all the time in the course,

149
00:07:58,620 --> 00:08:03,150
I use CWD, followed by the directory that I'm trying to change into.

150
00:08:05,090 --> 00:08:11,540
So I often you tell us first, what do we have, let's go into this code directory, you probably don't

151
00:08:11,540 --> 00:08:15,320
have that, but you could pick any other folder of yours and CD into it.

152
00:08:16,160 --> 00:08:17,900
So CD code.

153
00:08:19,240 --> 00:08:24,910
All right, so my prompt changes, it tells me I'm in the code folder, your prompt will look different,

154
00:08:24,910 --> 00:08:28,000
but it should light it likely will reveal to you where you are.

155
00:08:28,510 --> 00:08:35,200
But if not, you can always type D and we see, oh, now I'm in users called steal code.

156
00:08:35,920 --> 00:08:42,130
So just to illustrate this, if I were to open the current folder, now I'm in the code folder, not

157
00:08:42,130 --> 00:08:45,430
the home directory and I can continue to move.

158
00:08:45,430 --> 00:08:47,260
But first if I type Ellas.

159
00:08:48,180 --> 00:08:50,110
Now we see completely different contents.

160
00:08:50,540 --> 00:08:56,550
A lot of stuff in this code folder just from one of my other courses and I could take a look at any

161
00:08:56,550 --> 00:08:58,370
of these other locations.

162
00:08:58,380 --> 00:09:02,730
How about S.O.S, intro for Success intro.

163
00:09:03,000 --> 00:09:11,750
So CD 004 and I'm just going to hit tab to autocomplete for me and if I cd into that I type W.D. if

164
00:09:11,760 --> 00:09:12,630
I can spell it.

165
00:09:13,600 --> 00:09:19,810
Notice my working directory, my current location has changed, and if I type ours, we now see the

166
00:09:19,810 --> 00:09:27,070
contents and if I open, this is what we're looking at and finder text properties, S.O.S intro and

167
00:09:27,070 --> 00:09:28,960
then a zip file right there.

168
00:09:29,860 --> 00:09:31,180
Same thing on a Windows machine.

169
00:09:31,540 --> 00:09:35,560
If I pick some folder to CD into how about.

170
00:09:36,670 --> 00:09:37,240
I don't really know.

171
00:09:37,240 --> 00:09:41,130
I don't have much on here but let's go into desktop.

172
00:09:41,140 --> 00:09:42,380
Maybe I'm not sure what's on there.

173
00:09:42,670 --> 00:09:47,650
So CD desktop and I'm going to clear.

174
00:09:48,620 --> 00:09:55,820
And now, if I type would my working directory, my location has changed, I'm now on my home directory

175
00:09:56,090 --> 00:10:01,700
see such user slash cold steel on a Windows machine slash desktop if I type Aulus.

176
00:10:02,150 --> 00:10:03,510
Oh, there's nothing on here.

177
00:10:03,530 --> 00:10:04,580
Wow, that's underwhelming.

178
00:10:05,660 --> 00:10:13,110
And that actually leads me to my next command, which is a variation of CD CD followed by two dots.

179
00:10:13,370 --> 00:10:14,810
This is how we move backwards.

180
00:10:15,390 --> 00:10:17,750
So remember I showed you this example and finder.

181
00:10:17,880 --> 00:10:25,460
If I open this up, if I want a CD into this CD, if I want to double click in and then I decide I want

182
00:10:25,460 --> 00:10:27,400
to go back, I just click the back arrow.

183
00:10:28,160 --> 00:10:36,110
But using CD, what we actually can do is CD Dot Dot and this will take us back one level, one folder

184
00:10:36,740 --> 00:10:37,700
so we back up.

185
00:10:38,060 --> 00:10:41,340
So currently I'm in this case intro folder.

186
00:10:42,410 --> 00:10:43,490
This is what's inside of it.

187
00:10:44,000 --> 00:10:47,300
If I do CD, Dot Dot and I type W.D..

188
00:10:48,280 --> 00:10:49,300
This is where I am now.

189
00:10:49,870 --> 00:10:55,360
That's where I was before, I'm now one level back right here and I could do it again.

190
00:10:56,190 --> 00:10:58,370
But first, let me just show you the contents.

191
00:10:58,690 --> 00:10:59,620
All that stuff.

192
00:11:01,240 --> 00:11:01,820
Dot, dot.

193
00:11:02,860 --> 00:11:04,630
Now I'm back in my home directory.

194
00:11:05,230 --> 00:11:06,300
So same thing over here.

195
00:11:06,610 --> 00:11:08,960
I'm in the desktop or I'm on the desktop.

196
00:11:08,980 --> 00:11:10,050
There's nothing to look at.

197
00:11:10,390 --> 00:11:11,810
It's empty CD.

198
00:11:11,830 --> 00:11:12,490
Dot, dot.

199
00:11:13,700 --> 00:11:17,930
And now I'm in my home directory, so that's the very basics of navigation.

200
00:11:18,170 --> 00:11:23,360
We'll get more practice in the next video as we talk more about some other commands, like making folders

201
00:11:23,360 --> 00:11:30,890
and files and deleting folders and files along with those commands we still need to use and else all

202
00:11:30,890 --> 00:11:31,250
the time.

203
00:11:31,580 --> 00:11:33,320
So you'll get practice if you're new to this.

204
00:11:33,320 --> 00:11:39,110
But also, keep in mind, you're not going to just, you know, memorize it and become a terminal genius

205
00:11:39,110 --> 00:11:39,670
overnight.

206
00:11:39,920 --> 00:11:44,060
It takes time and it feels a little bit clunky when you're starting out.

207
00:11:44,330 --> 00:11:47,450
You don't need to feel like an expert before you move on to learn.

208
00:11:47,450 --> 00:11:52,850
Get just make it eat some sticky notes to remind yourself that, you know, five or six commands that

209
00:11:52,850 --> 00:11:56,390
we cover and stick them on your computer and just look at that if needed.

210
00:11:56,720 --> 00:11:58,550
Anyway, that's the basics of navigation.

211
00:11:58,820 --> 00:12:07,850
We covered allies for list for working directory and CD for change directory, CD Outbacks out one folder.

212
00:12:08,000 --> 00:12:14,600
And the other thing we did was open open doors will open a folder, the current folder that we're looking

213
00:12:14,600 --> 00:12:16,990
at and on a Windows machine it's start.
