WEBVTT

1
00:00:00.120 --> 00:00:02.279
<v Speaker 1>You know, when you pick up a technical manual, you

2
00:00:02.359 --> 00:00:06.040
<v Speaker 1>usually expect the dedication page to be standard boilerplate, like

3
00:00:06.160 --> 00:00:09.279
<v Speaker 1>to my spouse or to my kids. It's sweet, but

4
00:00:09.400 --> 00:00:10.919
<v Speaker 1>it's completely predictable.

5
00:00:11.119 --> 00:00:12.839
<v Speaker 2>It's the one page of the text you generally just

6
00:00:12.880 --> 00:00:15.480
<v Speaker 2>flip right past to get to the actual architecture diagrams

7
00:00:15.519 --> 00:00:16.160
<v Speaker 2>right exactly.

8
00:00:16.719 --> 00:00:19.280
<v Speaker 1>But today we are doing a deep dive into Ahmed

9
00:00:19.359 --> 00:00:23.960
<v Speaker 1>al Khaberi's work. Learn Linux Quickly, and his dedication genuinely

10
00:00:24.000 --> 00:00:27.280
<v Speaker 1>made me laugh out loud. He thanks his mom naturally,

11
00:00:27.920 --> 00:00:30.480
<v Speaker 1>but then he drops this note to his dad. He says,

12
00:00:31.239 --> 00:00:33.119
<v Speaker 1>I know you wanted me to go to medical school

13
00:00:33.119 --> 00:00:35.799
<v Speaker 1>to be a doctor, just like you. Sorry, pops, computer

14
00:00:35.920 --> 00:00:36.920
<v Speaker 1>science is the future.

15
00:00:37.479 --> 00:00:40.439
<v Speaker 2>I mean, it is a very confident opening m but

16
00:00:41.320 --> 00:00:44.200
<v Speaker 2>historically speaking, he really wasn't wrong to make that bet.

17
00:00:44.240 --> 00:00:47.280
<v Speaker 1>He was completely right. And that is our mission for

18
00:00:47.320 --> 00:00:50.600
<v Speaker 1>you today to decode the architecture of the world's most powerful,

19
00:00:50.679 --> 00:00:54.920
<v Speaker 1>yet largely invisible operating system, Linux, because if your perception

20
00:00:54.960 --> 00:00:57.479
<v Speaker 1>of Linux is still stuck on that old trope of

21
00:00:57.520 --> 00:00:59.920
<v Speaker 1>a lone hacker in a dark room compiling source code,

22
00:01:00.159 --> 00:01:03.719
<v Speaker 1>you're missing the macro scale of what this system actually is.

23
00:01:03.799 --> 00:01:06.879
<v Speaker 2>Oh, absolutely. The scale is staggering when you actually look

24
00:01:06.879 --> 00:01:07.519
<v Speaker 2>at the numbers.

25
00:01:07.920 --> 00:01:11.000
<v Speaker 1>Right, we are talking about the engine powering over ninety

26
00:01:11.040 --> 00:01:14.439
<v Speaker 1>percent of the world's supercomputers, seventy five percent of all

27
00:01:14.439 --> 00:01:19.480
<v Speaker 1>cloud solutions, your Android phone, government servers, Lexus and Toyota

28
00:01:19.519 --> 00:01:22.680
<v Speaker 1>smart cars, and I mean even some washing machines.

29
00:01:22.760 --> 00:01:26.319
<v Speaker 2>Yeah, you are interacting with a Linux kernel dozens of

30
00:01:26.359 --> 00:01:29.079
<v Speaker 2>times a day, even if a command line interface never

31
00:01:29.120 --> 00:01:30.680
<v Speaker 2>once flashes across your screen.

32
00:01:30.920 --> 00:01:33.799
<v Speaker 1>It's wild. Okay, let's unpack this before we start parsing

33
00:01:33.799 --> 00:01:36.920
<v Speaker 1>command syntax and all that. We need to understand where

34
00:01:36.920 --> 00:01:39.239
<v Speaker 1>it came from, because we need to know how it

35
00:01:39.280 --> 00:01:42.480
<v Speaker 1>differs from the systems we're used to, like Windows or macOS.

36
00:01:42.599 --> 00:01:46.640
<v Speaker 2>Well, the contrast with proprietary systems is stark, unlike Windlows

37
00:01:46.680 --> 00:01:50.560
<v Speaker 2>or mac which were engineered by massively funded corporate teams

38
00:01:50.640 --> 00:01:54.599
<v Speaker 2>under strict NDAs. Linux originated in nineteen ninety one as

39
00:01:54.640 --> 00:01:57.319
<v Speaker 2>a mere hobby project. Wait, a hobby project, yeah, by

40
00:01:57.359 --> 00:02:00.000
<v Speaker 2>Linus Torvoldz who just a computer science student in Fenmlas

41
00:02:00.040 --> 00:02:02.760
<v Speaker 2>and at the time he built his own Unix like

42
00:02:02.879 --> 00:02:07.159
<v Speaker 2>operating system and crucially it became the ultimate open source.

43
00:02:06.920 --> 00:02:10.360
<v Speaker 1>Project, meaning the source code, like the actual underlying logic

44
00:02:10.400 --> 00:02:13.199
<v Speaker 1>of the software is entirely public. Anyone can edit it.

45
00:02:13.280 --> 00:02:15.039
<v Speaker 1>But let me push back on this for a second.

46
00:02:15.240 --> 00:02:16.240
<v Speaker 2>Sure, go ahead. Wait.

47
00:02:16.319 --> 00:02:19.000
<v Speaker 1>If it's free and literally anyone on the internet can

48
00:02:19.159 --> 00:02:21.759
<v Speaker 1>edit it, how is it secure and stable enough to

49
00:02:21.840 --> 00:02:26.240
<v Speaker 1>run massive corporate infrastructure for like Amazon or Google?

50
00:02:26.479 --> 00:02:29.879
<v Speaker 2>That is a totally fair question. The open source model

51
00:02:29.919 --> 00:02:34.240
<v Speaker 2>relies on the idea of thousands of developers constantly reviewing

52
00:02:34.280 --> 00:02:37.319
<v Speaker 2>and patching the code. But to really understand how it

53
00:02:37.360 --> 00:02:40.719
<v Speaker 2>maintains stability for an Amazon server farm, we have to

54
00:02:40.759 --> 00:02:43.560
<v Speaker 2>break down the anatomy of the system. We have to

55
00:02:43.599 --> 00:02:46.879
<v Speaker 2>separate the concept of the operating system from the kernel.

56
00:02:47.039 --> 00:02:50.639
<v Speaker 1>Right, let's draw that line. Because people use those terms interchangeably,

57
00:02:50.680 --> 00:02:51.800
<v Speaker 1>don't they all the time?

58
00:02:52.400 --> 00:02:54.719
<v Speaker 2>But they are very different. The operating system is the

59
00:02:54.759 --> 00:02:58.919
<v Speaker 2>complete package. It includes the graphical user interface, text editors,

60
00:02:58.960 --> 00:03:02.400
<v Speaker 2>all the bundled apps. It manages the hardware and software overall,

61
00:03:02.919 --> 00:03:05.360
<v Speaker 2>but the kernel. What's fascinating here is that the kernel

62
00:03:05.439 --> 00:03:06.840
<v Speaker 2>is strictly the core.

63
00:03:06.639 --> 00:03:08.759
<v Speaker 1>The absolute center of it all exactly.

64
00:03:08.840 --> 00:03:11.960
<v Speaker 2>It's the part that organizes access to the CPU memory

65
00:03:12.000 --> 00:03:15.080
<v Speaker 2>and disc doesn't care about your web browser. It just

66
00:03:15.120 --> 00:03:16.520
<v Speaker 2>dictates resource allocation.

67
00:03:16.879 --> 00:03:18.840
<v Speaker 1>Let me try to map this out with an analogy

68
00:03:18.960 --> 00:03:23.080
<v Speaker 1>to see his tracks. So the operating system is a

69
00:03:23.199 --> 00:03:26.840
<v Speaker 1>full restaurant. You have the tables, the menus, the waiters,

70
00:03:26.919 --> 00:03:29.599
<v Speaker 1>the whole dining room. That's the environment we interact with.

71
00:03:30.000 --> 00:03:30.759
<v Speaker 2>I like where this is.

72
00:03:30.759 --> 00:03:34.599
<v Speaker 1>Going, But the kernel is the busy kitchen expediter. They

73
00:03:34.639 --> 00:03:37.240
<v Speaker 1>aren't talking to the customers at all. They actually decide

74
00:03:37.280 --> 00:03:40.840
<v Speaker 1>which chef gets which ingredients, which pan goes on which burner,

75
00:03:41.199 --> 00:03:43.120
<v Speaker 1>and exactly when a dish gets plaited.

76
00:03:43.560 --> 00:03:47.240
<v Speaker 2>That analogy holds up perfectly. And because this expeditor the

77
00:03:47.280 --> 00:03:51.000
<v Speaker 2>Linux kernel is open source, developers quickly realized they didn't

78
00:03:51.039 --> 00:03:53.199
<v Speaker 2>have to build just one type of restaurant around.

79
00:03:52.919 --> 00:03:55.439
<v Speaker 1>It, right, They could build thousands of different types of

80
00:03:55.479 --> 00:03:58.639
<v Speaker 1>dining rooms, all using that same amazing expeditor in the

81
00:03:58.719 --> 00:03:59.759
<v Speaker 1>kitchen exactly.

82
00:04:00.560 --> 00:04:04.039
<v Speaker 2>And that brings us to the concept of distributions or distros.

83
00:04:04.560 --> 00:04:07.319
<v Speaker 2>Since the kernel is free, people package it with different

84
00:04:07.360 --> 00:04:11.560
<v Speaker 2>apps and interfaces to create unique variations. Android is actually

85
00:04:11.599 --> 00:04:12.439
<v Speaker 2>a Linux distro.

86
00:04:12.759 --> 00:04:15.360
<v Speaker 1>Oh wow, I didn't even realize Android counted as a distro,

87
00:04:15.520 --> 00:04:17.879
<v Speaker 1>And Alcaberi mentions one called scientific Linux.

88
00:04:17.959 --> 00:04:22.759
<v Speaker 2>Right, yes, scientists use Scientific Linux specifically because it comes

89
00:04:22.800 --> 00:04:26.160
<v Speaker 2>pre packed with specialized scientific apps and research tools.

90
00:04:26.519 --> 00:04:29.439
<v Speaker 1>There are distros for everything, so if you're listening to

91
00:04:29.480 --> 00:04:31.680
<v Speaker 1>this and want to try it out, replacing your Windows

92
00:04:31.720 --> 00:04:35.480
<v Speaker 1>OS with a Linux distro sounds honestly terrifying for a beginner,

93
00:04:36.120 --> 00:04:38.120
<v Speaker 1>but the book has a safe way to play around.

94
00:04:37.879 --> 00:04:41.560
<v Speaker 2>Right, very safe. The book strongly suggests using a virtual

95
00:04:41.600 --> 00:04:45.040
<v Speaker 2>machine or a VM. You definitely don't need to wipe

96
00:04:45.040 --> 00:04:45.839
<v Speaker 2>your hard drive.

97
00:04:45.720 --> 00:04:48.720
<v Speaker 1>Which is a relief. A VM is basically like the

98
00:04:48.839 --> 00:04:51.959
<v Speaker 1>movie Inception for computers. It's a dream within a dream.

99
00:04:52.040 --> 00:04:53.279
<v Speaker 2>Ah, that's exactly what it is.

100
00:04:53.399 --> 00:04:57.319
<v Speaker 1>It's a computer running inside your host computer. It shares

101
00:04:57.360 --> 00:05:01.319
<v Speaker 1>your physical resources, but acts as a completely standale, isolated machine.

102
00:05:01.399 --> 00:05:04.240
<v Speaker 2>Right, so if you completely break the Linux system while learning,

103
00:05:04.240 --> 00:05:06.759
<v Speaker 2>you just delete the VM and start over. Your actual

104
00:05:06.759 --> 00:05:08.079
<v Speaker 2>computer is totally fine.

105
00:05:08.360 --> 00:05:10.480
<v Speaker 1>The technical specifics in the book are great for this.

106
00:05:10.800 --> 00:05:13.600
<v Speaker 1>You use a program called virtual box, grabbing a Buntu

107
00:05:13.639 --> 00:05:16.800
<v Speaker 1>ISO image and set it up. Alceberry suggests giving it

108
00:05:16.839 --> 00:05:19.920
<v Speaker 1>at least two gigabytes or ideally four gigabytes of RAM

109
00:05:20.319 --> 00:05:24.639
<v Speaker 1>and a dynamically allocated hard disc of at least ten gigabytes.

110
00:05:24.199 --> 00:05:26.639
<v Speaker 2>Four gigs of Ram is really the sweet bot if

111
00:05:26.680 --> 00:05:29.040
<v Speaker 2>you want the graphical interface of a Buntu to run

112
00:05:29.079 --> 00:05:31.560
<v Speaker 2>smoothly without lagging your host machine.

113
00:05:31.600 --> 00:05:34.279
<v Speaker 1>And there's this fun pop culture easter egg in the book.

114
00:05:34.480 --> 00:05:37.480
<v Speaker 1>When you create your username during setup, the author suggests

115
00:05:37.600 --> 00:05:39.199
<v Speaker 1>using Elliott.

116
00:05:38.879 --> 00:05:41.279
<v Speaker 2>A nod to the TV show Mister Robot.

117
00:05:41.040 --> 00:05:44.120
<v Speaker 1>Yep, the hacker main character. It's a great touch. So

118
00:05:44.279 --> 00:05:46.959
<v Speaker 1>you've booted up your Ubuntu virtual machine. You see a

119
00:05:47.000 --> 00:05:50.839
<v Speaker 1>familiar graphical user interface or GUI. You have apps like Libra,

120
00:05:50.879 --> 00:05:54.240
<v Speaker 1>Office and Dash. But to be a true power user,

121
00:05:54.639 --> 00:05:56.120
<v Speaker 1>you have to leave the mouse behind.

122
00:05:56.240 --> 00:05:59.839
<v Speaker 2>You really do. The guy is nice, but the real

123
00:06:00.319 --> 00:06:02.120
<v Speaker 2>of Linux is in the command line.

124
00:06:02.319 --> 00:06:05.000
<v Speaker 1>And this brings up a major point of confusion for beginners,

125
00:06:05.040 --> 00:06:06.959
<v Speaker 1>the difference between the terminal and the shell.

126
00:06:07.120 --> 00:06:08.800
<v Speaker 2>Oh, people mix these up constantly.

127
00:06:08.879 --> 00:06:10.839
<v Speaker 1>Let's go back to the drive through for an analogy.

128
00:06:11.160 --> 00:06:13.920
<v Speaker 1>The terminal is just the drive through speaker box. It's

129
00:06:13.959 --> 00:06:16.959
<v Speaker 1>the physical or emulated window where you speak your order.

130
00:06:17.079 --> 00:06:19.560
<v Speaker 2>Right. The terminal just displays the text. It doesn't actually

131
00:06:19.600 --> 00:06:21.480
<v Speaker 2>understand what you're typing exactly.

132
00:06:21.720 --> 00:06:24.199
<v Speaker 1>But the shell is the line cook wearing the headset

133
00:06:24.199 --> 00:06:27.560
<v Speaker 1>inside the shell is interpreting your order and actually making

134
00:06:27.600 --> 00:06:29.560
<v Speaker 1>the food or you know, executing the commands.

135
00:06:29.720 --> 00:06:32.439
<v Speaker 2>This raises an important question, though, what happens when you

136
00:06:32.480 --> 00:06:35.879
<v Speaker 2>type absolute gibberish into the terminal like you just mash

137
00:06:35.879 --> 00:06:36.959
<v Speaker 2>your keyboard and hit enter.

138
00:06:37.079 --> 00:06:38.879
<v Speaker 1>It doesn't crash, No, not at all.

139
00:06:38.959 --> 00:06:43.079
<v Speaker 2>The shell simply replies command not found. It's a literal interpreter.

140
00:06:43.439 --> 00:06:45.759
<v Speaker 2>If it doesn't recognize the exact order, it just hands

141
00:06:45.759 --> 00:06:46.319
<v Speaker 2>it back to you.

142
00:06:46.720 --> 00:06:49.319
<v Speaker 1>Here's where it gets really interesting to me. I love

143
00:06:49.360 --> 00:06:53.040
<v Speaker 1>how literal Linux commands are. You don't need to memorize

144
00:06:53.120 --> 00:06:56.439
<v Speaker 1>arcane magic spells. The commands are exactly what they do.

145
00:06:56.720 --> 00:06:59.120
<v Speaker 2>The Unix philosophy is to do one thing and do

146
00:06:59.199 --> 00:07:01.839
<v Speaker 2>it well, so the commands are very straightforward.

147
00:07:02.040 --> 00:07:04.920
<v Speaker 1>Let's run through some examples. You type date and it

148
00:07:05.000 --> 00:07:08.199
<v Speaker 1>prints the system date and time simple enough. You type

149
00:07:08.240 --> 00:07:11.360
<v Speaker 1>Michael Fagele it prints the calendar, and I love this.

150
00:07:11.439 --> 00:07:14.160
<v Speaker 1>You can time travel. You can type I'll call twenty

151
00:07:14.240 --> 00:07:17.279
<v Speaker 1>twenty two to see that year, or even autocoll FEP

152
00:07:17.480 --> 00:07:18.600
<v Speaker 1>nineteen ninety three.

153
00:07:18.839 --> 00:07:20.680
<v Speaker 2>Surprisingly fun, just to see what day of the week

154
00:07:20.720 --> 00:07:22.000
<v Speaker 2>you were born on. Yeah.

155
00:07:22.759 --> 00:07:25.000
<v Speaker 1>Then there's clear, which just wipes the screen when it

156
00:07:25.040 --> 00:07:29.199
<v Speaker 1>gets too messy, an echo, which literally repeats back whatever

157
00:07:29.240 --> 00:07:31.720
<v Speaker 1>you type. So if you type echo, cats are better

158
00:07:31.759 --> 00:07:34.680
<v Speaker 1>than dogs, it just prints cats are better than dogs.

159
00:07:35.600 --> 00:07:39.000
<v Speaker 2>Right back, which seems silly at first, but echo is

160
00:07:39.040 --> 00:07:42.759
<v Speaker 2>actually vital later on for writing automated scripts makes sense.

161
00:07:42.600 --> 00:07:46.199
<v Speaker 1>And my absolute favorite history. It shows a number list

162
00:07:46.240 --> 00:07:48.079
<v Speaker 1>of everything you've typed. If you want to run the

163
00:07:48.120 --> 00:07:50.480
<v Speaker 1>seventh command you typed again, you don't retype it. You

164
00:07:50.560 --> 00:07:53.160
<v Speaker 1>just type an exclamation point in the seventh like point seven.

165
00:07:53.279 --> 00:07:56.519
<v Speaker 2>It saves so much time. But commands rarely just run

166
00:07:56.560 --> 00:07:59.519
<v Speaker 2>in their basic state. They have options or flags to

167
00:07:59.600 --> 00:08:00.519
<v Speaker 2>change the behavior.

168
00:08:00.639 --> 00:08:03.079
<v Speaker 1>Right. Let's talk about hyphens, because this confused me at first.

169
00:08:03.079 --> 00:08:06.600
<v Speaker 2>Sure, a single hyphen is for abbreviations like a single letter,

170
00:08:06.680 --> 00:08:10.920
<v Speaker 2>so H. A double hyphen is for full words so human.

171
00:08:11.079 --> 00:08:12.959
<v Speaker 1>So if I want to check my available memory, I

172
00:08:13.040 --> 00:08:16.519
<v Speaker 1>type free, but it gives me the answer in raw kilobytes,

173
00:08:16.560 --> 00:08:18.959
<v Speaker 1>which is practically unreadable for a normal person.

174
00:08:19.040 --> 00:08:20.759
<v Speaker 2>Right, It's just a massive string of numbers.

175
00:08:21.000 --> 00:08:23.040
<v Speaker 1>So you add the option. You can type free H

176
00:08:23.160 --> 00:08:25.680
<v Speaker 1>or free human, and they do the exact same thing.

177
00:08:25.959 --> 00:08:30.319
<v Speaker 1>They display the memory in megabytes or gigabytes, a format

178
00:08:30.439 --> 00:08:32.279
<v Speaker 1>humans can actually read exactly.

179
00:08:32.559 --> 00:08:36.639
<v Speaker 2>Options just modify the command's default behavior. Now, we know

180
00:08:36.720 --> 00:08:39.279
<v Speaker 2>how to ask the computer for the date or its memory,

181
00:08:39.720 --> 00:08:42.320
<v Speaker 2>but how do we ask it how hard it's working

182
00:08:42.399 --> 00:08:42.840
<v Speaker 2>right now?

183
00:08:43.200 --> 00:08:45.799
<v Speaker 1>Taking the system's pulse, that is where the uptime command

184
00:08:45.799 --> 00:08:47.720
<v Speaker 1>comes in. You type it and it shows how long

185
00:08:47.759 --> 00:08:50.320
<v Speaker 1>the system has been running, who is logged in, and

186
00:08:50.399 --> 00:08:52.840
<v Speaker 1>something kind of intimidating called load average.

187
00:08:52.960 --> 00:08:55.159
<v Speaker 2>Load average is a great metric, but it confuses a

188
00:08:55.200 --> 00:08:57.559
<v Speaker 2>lot of people. It outputs three decimal numbers.

189
00:08:57.799 --> 00:08:59.960
<v Speaker 1>Yeah, what exactly do those three numbers mean?

190
00:09:00.240 --> 00:09:03.759
<v Speaker 2>They represent the system load basically the amount of work

191
00:09:03.759 --> 00:09:06.279
<v Speaker 2>the CPU is doing over the past one minute, five minutes,

192
00:09:06.320 --> 00:09:07.120
<v Speaker 2>and fifteen minutes.

193
00:09:07.200 --> 00:09:09.799
<v Speaker 1>So if my system is doing absolutely nothing, what does

194
00:09:09.840 --> 00:09:10.200
<v Speaker 1>it say?

195
00:09:10.360 --> 00:09:12.799
<v Speaker 2>A load average of zero point zero means the system

196
00:09:12.840 --> 00:09:15.919
<v Speaker 2>is completely idle. No processes are waiting in line for

197
00:09:15.960 --> 00:09:16.480
<v Speaker 2>the CPU.

198
00:09:16.639 --> 00:09:20.039
<v Speaker 1>Okay, so why does it give me three different timeframes, one, five,

199
00:09:20.080 --> 00:09:21.320
<v Speaker 1>and fifteen.

200
00:09:21.279 --> 00:09:24.240
<v Speaker 2>Because spotting trends is critical. Let's say your numbers are

201
00:09:24.360 --> 00:09:27.080
<v Speaker 2>two point zero zero four point zero zero zero zero.

202
00:09:27.759 --> 00:09:29.919
<v Speaker 2>The one minute load is a two, but the fifteen

203
00:09:29.960 --> 00:09:32.519
<v Speaker 2>minute load is a six. That means the system load

204
00:09:32.559 --> 00:09:34.600
<v Speaker 2>is much lower now than it was fifteen minutes ago.

205
00:09:34.799 --> 00:09:37.440
<v Speaker 1>Ah, so the system is cooling down exactly.

206
00:09:37.440 --> 00:09:39.960
<v Speaker 2>But if the numbers are reversed like five point zero zero,

207
00:09:40.000 --> 00:09:43.120
<v Speaker 2>three point zero two point zero zero, your one minute

208
00:09:43.159 --> 00:09:45.440
<v Speaker 2>load is way higher. That means the system load is

209
00:09:45.480 --> 00:09:46.799
<v Speaker 2>actively spiking right now.

210
00:09:46.840 --> 00:09:50.559
<v Speaker 1>That's incredibly useful for diagnosing a slow server. And Alcaberi

211
00:09:50.600 --> 00:09:53.240
<v Speaker 1>also notes you can use the lcpu command to quickly

212
00:09:53.279 --> 00:09:57.960
<v Speaker 1>list your CPU architecture and DFAIH to check available disk

213
00:09:58.000 --> 00:09:58.840
<v Speaker 1>space right.

214
00:09:58.960 --> 00:10:02.039
<v Speaker 2>Df stands for disc free, and throwing that H on

215
00:10:02.080 --> 00:10:03.600
<v Speaker 2>there makes it human readable again.

216
00:10:03.799 --> 00:10:05.519
<v Speaker 1>So now we know how the system is feeling and

217
00:10:05.559 --> 00:10:07.679
<v Speaker 1>how hard it's working, but we need to know how

218
00:10:07.679 --> 00:10:09.799
<v Speaker 1>to move around inside its brain. Where are all these

219
00:10:09.840 --> 00:10:10.879
<v Speaker 1>files actually.

220
00:10:10.639 --> 00:10:13.399
<v Speaker 2>Kept the filesystem? This is where Linux is very different

221
00:10:13.399 --> 00:10:16.200
<v Speaker 2>from Windows, which uses C drives and D drives.

222
00:10:16.440 --> 00:10:18.879
<v Speaker 1>Yeah. Algebra explains that the Linux filesystem is like an

223
00:10:18.960 --> 00:10:21.279
<v Speaker 1>upside down tree. It starts at the very top with

224
00:10:21.320 --> 00:10:24.440
<v Speaker 1>the root directory, which is represented simply by a single

225
00:10:24.519 --> 00:10:25.639
<v Speaker 1>forward slash.

226
00:10:25.879 --> 00:10:29.279
<v Speaker 2>Just everything branches out from that single forward slash, and.

227
00:10:29.240 --> 00:10:32.759
<v Speaker 1>To move around you use CD, which stands for change directory.

228
00:10:32.799 --> 00:10:35.960
<v Speaker 1>So CD takes you to the very top, but if

229
00:10:36.000 --> 00:10:39.399
<v Speaker 1>you get lost, use PWD.

230
00:10:39.000 --> 00:10:40.039
<v Speaker 2>Right working directory.

231
00:10:40.120 --> 00:10:43.440
<v Speaker 1>Yes, I love PWD, it's the ultimate you are here

232
00:10:43.440 --> 00:10:46.080
<v Speaker 1>a red star on a mall map. If you're lost,

233
00:10:46.120 --> 00:10:48.159
<v Speaker 1>you just have PbD and it tells you exactly what

234
00:10:48.200 --> 00:10:49.120
<v Speaker 1>folder you're standing in.

235
00:10:49.279 --> 00:10:52.279
<v Speaker 2>It's essential, and once you know where you are, you

236
00:10:52.440 --> 00:10:55.960
<v Speaker 2>use LS to list the files, or ll ls l

237
00:10:56.039 --> 00:10:58.120
<v Speaker 2>e L for a long list that shows all the

238
00:10:58.159 --> 00:10:58.919
<v Speaker 2>file permissions.

239
00:10:58.960 --> 00:11:01.799
<v Speaker 1>The directory structure is so organized too. It's not just

240
00:11:01.840 --> 00:11:02.720
<v Speaker 1>a free for all.

241
00:11:02.679 --> 00:11:06.039
<v Speaker 2>Oh, it is trickly segregated by design. For example, you're

242
00:11:06.080 --> 00:11:09.279
<v Speaker 2>the home directory, which is where regular users live, your documents,

243
00:11:09.320 --> 00:11:10.159
<v Speaker 2>your downloads, but.

244
00:11:10.120 --> 00:11:12.279
<v Speaker 1>The administrator, the root user, doesn't live there.

245
00:11:12.440 --> 00:11:15.399
<v Speaker 2>No, the root user has their own exclusive home called Root.

246
00:11:15.759 --> 00:11:19.000
<v Speaker 2>It's completely separate from regular users to prevent accidental damage.

247
00:11:19.039 --> 00:11:22.159
<v Speaker 1>And then there's Bin and SPIN. Bin holds your essential

248
00:11:22.519 --> 00:11:26.639
<v Speaker 1>everyday programs, your standard binaries, but SPIN holds the system

249
00:11:26.679 --> 00:11:28.559
<v Speaker 1>administration programs.

250
00:11:28.360 --> 00:11:31.440
<v Speaker 2>Right, the tools that require special privileges to run. It

251
00:11:31.559 --> 00:11:34.639
<v Speaker 2>keeps the heavy machinery locked away from the standard tools.

252
00:11:34.679 --> 00:11:36.879
<v Speaker 1>But there is one directory that comes with a massive

253
00:11:36.919 --> 00:11:39.000
<v Speaker 1>warning label, the tempep directory.

254
00:11:39.159 --> 00:11:41.200
<v Speaker 2>Ah, yes, the temporary folder.

255
00:11:41.320 --> 00:11:45.600
<v Speaker 1>This holds temporary files obviously, but the book explicitly warns

256
00:11:45.639 --> 00:11:49.720
<v Speaker 1>you never ever store important files here. Why is that?

257
00:11:50.200 --> 00:11:53.840
<v Speaker 2>Because of how it's mounted. In many systems, TEMP exists

258
00:11:53.879 --> 00:11:57.000
<v Speaker 2>in the system's volatile memory. Yeah, meaning the moment this

259
00:11:57.080 --> 00:12:00.639
<v Speaker 2>system reboots or loses power, that entire wi your folder

260
00:12:00.720 --> 00:12:04.360
<v Speaker 2>is wiped out completely, just poof gone exactly. It's designed

261
00:12:04.360 --> 00:12:07.200
<v Speaker 2>for apps to drop temporary session data and clean it

262
00:12:07.279 --> 00:12:10.120
<v Speaker 2>up automatically. If you save your novel on there and

263
00:12:10.159 --> 00:12:12.559
<v Speaker 2>restart your computer, it is gone forever.

264
00:12:13.000 --> 00:12:15.200
<v Speaker 1>That is a brutal lesson to learn the hard way.

265
00:12:15.240 --> 00:12:17.480
<v Speaker 1>So let's zoom out think about how far we've come

266
00:12:17.519 --> 00:12:18.399
<v Speaker 1>today on this deep dive.

267
00:12:18.480 --> 00:12:19.440
<v Speaker 2>Let's a lot of ground to cover.

268
00:12:19.679 --> 00:12:23.759
<v Speaker 1>We started with understanding Linus Torvald's little nineteen ninety one

269
00:12:23.879 --> 00:12:26.919
<v Speaker 1>hobby project. We talked about spinning up in a Buntu

270
00:12:27.000 --> 00:12:30.639
<v Speaker 1>virtual machine, literally talking directly to the shell with commands

271
00:12:30.720 --> 00:12:33.720
<v Speaker 1>like echo and corticle. We learned how to check the

272
00:12:33.759 --> 00:12:37.279
<v Speaker 1>CPU's load average to spot performance bikes, and navigated the

273
00:12:37.399 --> 00:12:39.399
<v Speaker 1>upside down tree of the root file system.

274
00:12:39.440 --> 00:12:42.279
<v Speaker 2>Once you understand the logic, it's actually incredibly elegant.

275
00:12:42.360 --> 00:12:44.360
<v Speaker 1>So what does this all mean? Why go through the

276
00:12:44.399 --> 00:12:46.399
<v Speaker 1>effort of learning to talk to a machine like this?

277
00:12:46.799 --> 00:12:49.320
<v Speaker 2>Well, I think it leaves you with something really fascinating

278
00:12:49.320 --> 00:12:53.639
<v Speaker 2>to ponder think about this. The very same free, open

279
00:12:53.679 --> 00:12:56.080
<v Speaker 2>source code written by a college student as a fun

280
00:12:56.120 --> 00:12:59.759
<v Speaker 2>hobby in nineteen ninety one is currently washing your clothes.

281
00:13:00.159 --> 00:13:03.960
<v Speaker 2>It's managing global banking clouds. It is literally running the

282
00:13:04.000 --> 00:13:05.720
<v Speaker 2>International Space Station right now.

283
00:13:05.840 --> 00:13:07.360
<v Speaker 1>That is insane to think about.

284
00:13:07.480 --> 00:13:11.720
<v Speaker 2>It really makes you wonder what other small, collaborative, weird

285
00:13:11.879 --> 00:13:15.639
<v Speaker 2>little hobbies happening on the Internet right now might quietly

286
00:13:15.679 --> 00:13:18.039
<v Speaker 2>become the invisible infrastructure of our future.

287
00:13:18.159 --> 00:13:21.519
<v Speaker 1>A hobby today, the invisible engine of the world tomorrow.

288
00:13:21.919 --> 00:13:23.919
<v Speaker 1>Thanks for taking this deep dive with us, and we'll

289
00:13:23.919 --> 00:13:24.799
<v Speaker 1>see you on the next one.
