WEBVTT

1
00:00:00.160 --> 00:00:04.040
<v Speaker 1>Welcome to the deep dive today. We're really cutting through

2
00:00:04.080 --> 00:00:07.400
<v Speaker 1>the noise to get right to the core of Linux.

3
00:00:07.480 --> 00:00:09.039
<v Speaker 2>Yeah, the foundations exactly.

4
00:00:09.080 --> 00:00:12.359
<v Speaker 1>Think of this as your essential guide, you know, understanding

5
00:00:12.400 --> 00:00:15.400
<v Speaker 1>what makes a Linux system tick, right from power on

6
00:00:15.560 --> 00:00:19.280
<v Speaker 1>to keeping your data safe. We're pulling insights from Steven

7
00:00:19.359 --> 00:00:22.719
<v Speaker 1>Surring's LPIC one practice test, kind of a shortcut to

8
00:00:22.760 --> 00:00:26.879
<v Speaker 1>those aha moments, but you know, without getting totally overwhelmed.

9
00:00:27.000 --> 00:00:30.039
<v Speaker 2>And that's key, isn't it, Because whether you're just curious

10
00:00:30.120 --> 00:00:33.000
<v Speaker 2>or you actually manage Linux systems day to day, these

11
00:00:33.039 --> 00:00:35.960
<v Speaker 2>concepts are well, they're fundamental to so much tech out there,

12
00:00:36.600 --> 00:00:39.719
<v Speaker 2>ensuring i mean, twenty years in the field engineering Sissigmin

13
00:00:39.880 --> 00:00:43.840
<v Speaker 2>Architecture author, Linux World editor. He's packaged up that.

14
00:00:43.799 --> 00:00:45.799
<v Speaker 1>Real world knowledge, but practical stuff.

15
00:00:45.840 --> 00:00:49.479
<v Speaker 2>Absolutely. Our mission here is to demystify Linux admin, give

16
00:00:49.520 --> 00:00:53.679
<v Speaker 2>you a clear, solid understanding of how it all fits together,

17
00:00:53.759 --> 00:00:54.719
<v Speaker 2>more than just definitions.

18
00:00:54.759 --> 00:00:58.399
<v Speaker 1>Okay, let's dive in. Then the machine's off, cold, silent.

19
00:00:58.799 --> 00:01:01.119
<v Speaker 1>What's that very first spart? How does it even begin

20
00:01:01.159 --> 00:01:03.200
<v Speaker 1>to wake up and become you know, Linux?

21
00:01:03.560 --> 00:01:07.200
<v Speaker 2>It's a really precise sequence, actually, almost like choreography. It

22
00:01:07.239 --> 00:01:11.120
<v Speaker 2>starts way down low, with the BIOS or more commonly

23
00:01:11.200 --> 00:01:13.280
<v Speaker 2>now UEFI firmware.

24
00:01:13.480 --> 00:01:15.480
<v Speaker 1>Right, the basic hardware stuff exactly.

25
00:01:15.519 --> 00:01:17.840
<v Speaker 2>That's the very first code that runs. It does its

26
00:01:17.920 --> 00:01:20.319
<v Speaker 2>initial checks, then it hands control.

27
00:01:19.959 --> 00:01:21.879
<v Speaker 1>Over to the bootloader like GRUB.

28
00:01:22.159 --> 00:01:25.680
<v Speaker 2>Yeah, GRB legacy or GRB two are the most common examples.

29
00:01:25.959 --> 00:01:28.879
<v Speaker 2>The bootloader's job is basically to find the operating system

30
00:01:29.000 --> 00:01:30.680
<v Speaker 2>kernel and get it ready to launch.

31
00:01:30.799 --> 00:01:33.920
<v Speaker 1>Okay, so the bootloader finds the kernel, the heart of

32
00:01:33.959 --> 00:01:37.200
<v Speaker 1>the OS. What's next? Does a kernel just take over?

33
00:01:37.400 --> 00:01:41.319
<v Speaker 2>It does, but there's another clever step. First, the kernel

34
00:01:41.359 --> 00:01:43.799
<v Speaker 2>starts loading, but then it often relies on something called

35
00:01:43.799 --> 00:01:47.239
<v Speaker 2>the intotramps in initial RAM file system. Yeah, it's a

36
00:01:47.439 --> 00:01:51.200
<v Speaker 2>it's quite ingenious. It's a tiny temporary root filesystem loaded

37
00:01:51.200 --> 00:01:54.680
<v Speaker 2>into memory, okay, because it contains just the essential drivers

38
00:01:54.719 --> 00:01:57.400
<v Speaker 2>like for your discontroller needed to mount the actual root

39
00:01:57.400 --> 00:02:00.439
<v Speaker 2>filesystem from your hard drive or ssd ah.

40
00:02:00.480 --> 00:02:03.480
<v Speaker 1>So it's like a temporary toolkit to access the main storage.

41
00:02:03.799 --> 00:02:06.640
<v Speaker 2>Exactly. It lets Linux boot on tons of different hardware

42
00:02:06.680 --> 00:02:10.280
<v Speaker 2>before it can even fully see the main disc Super flexible.

43
00:02:10.000 --> 00:02:13.960
<v Speaker 1>That makes sense. Okay, kernels loaded, we've used the innatrams

44
00:02:14.000 --> 00:02:16.520
<v Speaker 1>to find the real file system. How does it get

45
00:02:16.560 --> 00:02:19.680
<v Speaker 1>ready for us? You know, start services, let us log.

46
00:02:19.479 --> 00:02:23.680
<v Speaker 2>In, right, that's the system initialization phase. The kernel. Once

47
00:02:23.719 --> 00:02:27.639
<v Speaker 2>it's up, hands off control to the very first userspace process.

48
00:02:28.000 --> 00:02:30.960
<v Speaker 2>Traditionally this was CISSV in it the old way, the

49
00:02:31.000 --> 00:02:35.360
<v Speaker 2>older classic way. Most modern distries now use systems both

50
00:02:35.400 --> 00:02:38.199
<v Speaker 2>fundamentally do the same thing though. Start all the necessary

51
00:02:38.240 --> 00:02:41.719
<v Speaker 2>background services, mount file systems, listened in, et cetera. Get

52
00:02:41.759 --> 00:02:43.919
<v Speaker 2>the network going, and bring the system up to a

53
00:02:44.039 --> 00:02:44.719
<v Speaker 2>usable state.

54
00:02:44.879 --> 00:02:47.360
<v Speaker 1>Yeah, that first process, that's PID one.

55
00:02:47.599 --> 00:02:50.319
<v Speaker 2>That's the one process, ID one, whether it's sissv in

56
00:02:50.400 --> 00:02:53.199
<v Speaker 2>it or systemed, it's the ancestor of pretty much everything

57
00:02:53.199 --> 00:02:55.199
<v Speaker 2>else running on the system. A critical process.

58
00:02:55.319 --> 00:02:58.319
<v Speaker 1>Got it. So these in its systems bring things up?

59
00:02:58.319 --> 00:03:00.719
<v Speaker 1>Can you tell Linux how to come up? Like different modes?

60
00:03:00.759 --> 00:03:02.960
<v Speaker 1>Sometimes I just need a command line for fixing things.

61
00:03:03.240 --> 00:03:06.879
<v Speaker 2>Absolutely. That's where run levels in cissp in it or

62
00:03:06.919 --> 00:03:11.400
<v Speaker 2>boot targets in systems come in. They define different operational states.

63
00:03:11.159 --> 00:03:12.680
<v Speaker 1>Like safe mode and Windows sort of.

64
00:03:12.800 --> 00:03:16.319
<v Speaker 2>Kind of analogous. Yeah, you have single user mode that's

65
00:03:16.360 --> 00:03:18.879
<v Speaker 2>often run level one or rescue dot target. It's minimal,

66
00:03:19.039 --> 00:03:22.599
<v Speaker 2>usually no networking, just a rootshell, perfect for maintenance. Okay,

67
00:03:22.919 --> 00:03:25.520
<v Speaker 2>then you've got your typical states like a multi user

68
00:03:25.560 --> 00:03:28.560
<v Speaker 2>command line environment run level three or multi user dot

69
00:03:28.599 --> 00:03:32.360
<v Speaker 2>target or the full multi user graphical desktop run level

70
00:03:32.360 --> 00:03:33.719
<v Speaker 2>five or graphical dot target.

71
00:03:33.800 --> 00:03:36.000
<v Speaker 1>And if things go wrong during boot where I want

72
00:03:36.000 --> 00:03:38.960
<v Speaker 1>to change the default state, what tools do I use?

73
00:03:39.039 --> 00:03:43.000
<v Speaker 2>Good question? For diagnosing boot issues, DMEs is invaluable. It

74
00:03:43.039 --> 00:03:45.199
<v Speaker 2>shows you the kernel's messages right from startup. You can

75
00:03:45.240 --> 00:03:47.759
<v Speaker 2>see hardware detection, driver loading errors.

76
00:03:47.919 --> 00:03:48.240
<v Speaker 1>Okay.

77
00:03:48.400 --> 00:03:52.080
<v Speaker 2>On system systems general, pizerl is your main log viewing tool.

78
00:03:52.280 --> 00:03:55.240
<v Speaker 2>It's incredibly powerful for seeing what happened during boot, checking

79
00:03:55.280 --> 00:03:57.120
<v Speaker 2>service status everything.

80
00:03:56.840 --> 00:03:58.960
<v Speaker 1>Right, systems journal YEP, and to.

81
00:03:58.960 --> 00:04:02.680
<v Speaker 2>Manage services and targe gets use system tail like system taitl.

82
00:04:02.800 --> 00:04:05.039
<v Speaker 2>Set default graphical dot target makes it boot to the

83
00:04:05.039 --> 00:04:06.159
<v Speaker 2>desktop by default.

84
00:04:06.360 --> 00:04:08.080
<v Speaker 1>And rebooting is it just pulling the plug?

85
00:04:08.120 --> 00:04:11.360
<v Speaker 2>Haha? Please don't. The class command is in its six

86
00:04:11.919 --> 00:04:14.560
<v Speaker 2>or with systemed system tel to reboot is the standard

87
00:04:14.560 --> 00:04:17.519
<v Speaker 2>way graceful shut down and restart and.

88
00:04:17.480 --> 00:04:19.720
<v Speaker 1>A quick troubleshooting tip from the source. Ah yes.

89
00:04:19.759 --> 00:04:22.000
<v Speaker 2>If a hard disk isn't even showing up in Linux

90
00:04:22.079 --> 00:04:24.759
<v Speaker 2>like DMAs doesn't see it, the first place to check

91
00:04:24.800 --> 00:04:28.759
<v Speaker 2>is often the system bios or UF five setup. Linux

92
00:04:28.800 --> 00:04:31.800
<v Speaker 2>can't see hardware. The firmware doesn't recognize first.

93
00:04:31.920 --> 00:04:34.920
<v Speaker 1>Makes sense, starts the lowest level. Okay, so the system's alive.

94
00:04:35.480 --> 00:04:40.279
<v Speaker 1>But how does Linux organize everything? It feels very structured

95
00:04:40.319 --> 00:04:42.800
<v Speaker 1>compared to say, Windows drive letters.

96
00:04:42.879 --> 00:04:45.399
<v Speaker 2>It is, and that structure is key. It's largely governed

97
00:04:45.399 --> 00:04:48.959
<v Speaker 2>by the Filesystem Hierarchy Standard, the FHS FAHS. Yeah, it's

98
00:04:49.000 --> 00:04:51.920
<v Speaker 2>a standard that defines where specific types of files and

99
00:04:51.959 --> 00:04:56.720
<v Speaker 2>directories should live. It provides consistency across different Linux distributions.

100
00:04:56.319 --> 00:04:58.519
<v Speaker 1>So it's at or always means configuration.

101
00:04:58.040 --> 00:05:01.480
<v Speaker 2>Files more or less exactly. That predictability is a huge

102
00:05:01.480 --> 00:05:04.680
<v Speaker 2>advantage for anyone managing Linux systems. You know where to

103
00:05:04.720 --> 00:05:05.399
<v Speaker 2>look for things.

104
00:05:05.680 --> 00:05:07.160
<v Speaker 1>So walk us through some of the big ones. The

105
00:05:07.199 --> 00:05:09.519
<v Speaker 1>really critical directories defined by the FAHS.

106
00:05:09.839 --> 00:05:14.759
<v Speaker 2>Heay top level is bull the root file system. Everything absolutely,

107
00:05:14.800 --> 00:05:16.040
<v Speaker 2>everything stems.

108
00:05:15.639 --> 00:05:17.439
<v Speaker 1>From there, the single slash YEP.

109
00:05:17.720 --> 00:05:20.480
<v Speaker 2>Then boot is crucial. It holds the kernel itself. The

110
00:05:20.519 --> 00:05:23.560
<v Speaker 2>any tramps we talked about, bootloader can figs like grub

111
00:05:23.600 --> 00:05:25.920
<v Speaker 2>dot cfg. You don't want to mess that up, definitely.

112
00:05:25.920 --> 00:05:28.839
<v Speaker 2>Not et cetera is where system wide configuration files live,

113
00:05:29.319 --> 00:05:32.879
<v Speaker 2>things like etcetera, STAB, for filesystem mounts at tetcresolve dot

114
00:05:32.920 --> 00:05:37.199
<v Speaker 2>com for DNS network settings, service can figs it's the

115
00:05:37.199 --> 00:05:38.079
<v Speaker 2>control center.

116
00:05:37.920 --> 00:05:39.240
<v Speaker 1>Got it can figs and ACCA.

117
00:05:39.720 --> 00:05:43.240
<v Speaker 2>Home is where user directories are typically created, so you'd

118
00:05:43.240 --> 00:05:45.920
<v Speaker 2>have homilis home Bob containing their personal.

119
00:05:45.560 --> 00:05:48.480
<v Speaker 1>File and stuff that changes a lot, like logs.

120
00:05:48.319 --> 00:05:51.680
<v Speaker 2>That goes in VAR for variable data. Varlog is the

121
00:05:51.720 --> 00:05:54.240
<v Speaker 2>standard place for system logs. You also find things like

122
00:05:54.279 --> 00:05:58.759
<v Speaker 2>mailspools and varspool temporary files used by services, database files

123
00:05:58.759 --> 00:05:59.920
<v Speaker 2>sometimes okay var.

124
00:06:00.079 --> 00:06:03.000
<v Speaker 1>For variable stuff. What about US? I see that everywhere?

125
00:06:03.240 --> 00:06:06.199
<v Speaker 2>S tor often pronounced user, though historically it's good for

126
00:06:06.279 --> 00:06:12.000
<v Speaker 2>Unix system resources. Holds most user installed applications and shared libraries, documentation, etc.

127
00:06:12.399 --> 00:06:14.800
<v Speaker 2>It's usually one of the largest directories.

128
00:06:14.360 --> 00:06:16.120
<v Speaker 1>And USB drives. Where do they pop up?

129
00:06:16.240 --> 00:06:19.519
<v Speaker 2>The FHS designates media as the standard mount point for

130
00:06:19.600 --> 00:06:23.240
<v Speaker 2>removable media. Some systems might also use run media or

131
00:06:23.279 --> 00:06:26.519
<v Speaker 2>other locations, but media is the traditional FAHS spot.

132
00:06:26.759 --> 00:06:30.000
<v Speaker 1>This structure feels really logical. Now thinking about the actual discs,

133
00:06:30.160 --> 00:06:32.560
<v Speaker 1>How does Linux lay them out? Partitions and such?

134
00:06:32.720 --> 00:06:35.600
<v Speaker 2>Yeah, good disc layout is important. You typically partition your

135
00:06:35.639 --> 00:06:38.240
<v Speaker 2>drive to create separate filesystems for different parts of.

136
00:06:38.160 --> 00:06:40.480
<v Speaker 1>The hierarchy, like a separate partition for home.

137
00:06:40.439 --> 00:06:43.199
<v Speaker 2>Exactly or for VAR or t pay. It helps with

138
00:06:43.319 --> 00:06:47.600
<v Speaker 2>organizations security and performance. If VAR fills up with logs,

139
00:06:47.639 --> 00:06:49.839
<v Speaker 2>it won't crash the whole system by filling the root

140
00:06:49.879 --> 00:06:54.199
<v Speaker 2>file systems Smart end swap space AH swap space essential.

141
00:06:54.600 --> 00:06:57.519
<v Speaker 2>It's disc space that Linux uses as virtual memory when

142
00:06:57.519 --> 00:07:01.120
<v Speaker 2>your physical ram gets full. It's slower than obviously, but

143
00:07:01.279 --> 00:07:03.920
<v Speaker 2>it prevents the system from crashing due to lack of memory.

144
00:07:04.040 --> 00:07:06.000
<v Speaker 2>Usually it's on its own partition okay.

145
00:07:06.000 --> 00:07:08.000
<v Speaker 1>And for booting with UEFI you.

146
00:07:07.959 --> 00:07:11.920
<v Speaker 2>Need an EFI system Partition or ESP is usually formatted

147
00:07:11.959 --> 00:07:16.079
<v Speaker 2>as FA thirty two, surprisingly not a native Linux file system.

148
00:07:16.360 --> 00:07:17.519
<v Speaker 2>That's where the bootloader lives.

149
00:07:17.519 --> 00:07:21.879
<v Speaker 1>For UAFI systems, FAT thirty two. Interesting and partitioning schemes

150
00:07:22.079 --> 00:07:23.759
<v Speaker 1>MBR versus GPT.

151
00:07:23.759 --> 00:07:28.279
<v Speaker 2>Right MBR Masterboot Record is the older style. It has limitations,

152
00:07:28.399 --> 00:07:32.199
<v Speaker 2>most notably a two terabyte limit on perkission size. GPT

153
00:07:32.680 --> 00:07:36.639
<v Speaker 2>Goid Partition Table is the modern standard. Supports much larger

154
00:07:36.639 --> 00:07:40.120
<v Speaker 2>disks and more partitions. You'll use GPT on almost any

155
00:07:40.160 --> 00:07:40.920
<v Speaker 2>modern system.

156
00:07:41.040 --> 00:07:44.480
<v Speaker 1>Good to know, especially with big drives now okay, shifting

157
00:07:44.519 --> 00:07:48.199
<v Speaker 1>gears slightly hard links versus symbolic links. This trips people up,

158
00:07:48.319 --> 00:07:48.720
<v Speaker 1>it can.

159
00:07:48.879 --> 00:07:51.399
<v Speaker 2>Yeah, they're both ways to refer to files, but they

160
00:07:51.399 --> 00:07:55.199
<v Speaker 2>work differently. A hard link is essentially another name for

161
00:07:55.240 --> 00:07:57.600
<v Speaker 2>the exact same file data another name.

162
00:07:57.720 --> 00:07:58.079
<v Speaker 1>Yeah.

163
00:07:58.279 --> 00:08:01.360
<v Speaker 2>Imagine if files data has an ID number on the

164
00:08:01.439 --> 00:08:04.639
<v Speaker 2>disc an eNode number. A hard link is just another

165
00:08:04.680 --> 00:08:07.079
<v Speaker 2>directory entry pointing to that same inode.

166
00:08:07.240 --> 00:08:09.759
<v Speaker 1>So deleting one hard link doesn't delete the file.

167
00:08:09.720 --> 00:08:12.000
<v Speaker 2>Not if other hard links to that inode still exist.

168
00:08:12.120 --> 00:08:14.759
<v Speaker 2>The data only gets removed when the last link pointing

169
00:08:14.759 --> 00:08:17.639
<v Speaker 2>to it is gone. And crucially, hard links must be

170
00:08:17.639 --> 00:08:20.800
<v Speaker 2>on the same filesystem because inode numbers are filesystems specific.

171
00:08:20.879 --> 00:08:22.639
<v Speaker 1>Okay, So what's a symbolic link.

172
00:08:22.480 --> 00:08:25.600
<v Speaker 2>Then, symbolic link or simlink or soft link. It's more

173
00:08:25.639 --> 00:08:28.199
<v Speaker 2>like a pointer or a shortcut. It's a small file

174
00:08:28.240 --> 00:08:31.120
<v Speaker 2>that simply contains the path to another file or directory.

175
00:08:31.399 --> 00:08:33.240
<v Speaker 1>Huh, like a window shortcut.

176
00:08:33.039 --> 00:08:35.799
<v Speaker 2>Exactly like that. It has its own inode number. It

177
00:08:35.919 --> 00:08:40.200
<v Speaker 2>just points somewhere else. This means sim links can cross filesystems,

178
00:08:40.600 --> 00:08:42.679
<v Speaker 2>but if you delete the original file, the sim link

179
00:08:42.679 --> 00:08:43.919
<v Speaker 2>becomes broken. It points to.

180
00:08:43.919 --> 00:08:46.720
<v Speaker 1>Nothing, and you create those with ln ns.

181
00:08:46.480 --> 00:08:49.639
<v Speaker 2>Yep LNS target link name very useful.

182
00:08:49.320 --> 00:08:51.759
<v Speaker 1>Okay, and tools for managing disk space.

183
00:08:52.440 --> 00:08:56.519
<v Speaker 2>DF shows DISC free space on mounted filesystems. D estimates

184
00:08:56.519 --> 00:08:59.720
<v Speaker 2>DISC usage for files and directories. Very handy for finding

185
00:08:59.759 --> 00:09:02.039
<v Speaker 2>what's eating up space, DPN.

186
00:09:01.679 --> 00:09:04.000
<v Speaker 1>Do got it? And creating filesystems.

187
00:09:04.279 --> 00:09:07.919
<v Speaker 2>Use MKFS commands like nkfs dot e st four to

188
00:09:07.919 --> 00:09:11.759
<v Speaker 2>create an XT four filesystem, or mk swap to prepare

189
00:09:11.799 --> 00:09:13.759
<v Speaker 2>a partition for swap space.

190
00:09:13.799 --> 00:09:15.320
<v Speaker 1>And making sure they mount automatically.

191
00:09:15.440 --> 00:09:18.879
<v Speaker 2>That's etc. F STAB. That file lists all the file

192
00:09:18.960 --> 00:09:21.639
<v Speaker 2>systems the system should mount at boot time, where to

193
00:09:21.679 --> 00:09:24.600
<v Speaker 2>mount them, and with what options critical canfig file?

194
00:09:24.639 --> 00:09:26.360
<v Speaker 1>All right, we understand the layout. Now how do we

195
00:09:26.399 --> 00:09:28.679
<v Speaker 1>actually talk to the machine? The command line right?

196
00:09:28.759 --> 00:09:31.679
<v Speaker 2>Absolutely, the command line interface or a CLI is where

197
00:09:31.679 --> 00:09:34.519
<v Speaker 2>the real power lies in Linux administration. It's not just

198
00:09:34.559 --> 00:09:35.840
<v Speaker 2>an afterthought, it's central.

199
00:09:36.159 --> 00:09:39.720
<v Speaker 1>So the basics moving around listing files.

200
00:09:39.720 --> 00:09:42.840
<v Speaker 2>Your bread and butter. Dot LS to list files, CD

201
00:09:42.919 --> 00:09:46.399
<v Speaker 2>to change directory, MV to move a rename, CP to copy,

202
00:09:46.519 --> 00:09:50.879
<v Speaker 2>RM to remove. You'll use these constantly. PWGAWD prince your

203
00:09:50.879 --> 00:09:53.720
<v Speaker 2>present working directory tells you where you are, and history

204
00:09:53.759 --> 00:09:56.639
<v Speaker 2>is amazing shows you your previous commands. Let's you reuse

205
00:09:56.679 --> 00:09:58.440
<v Speaker 2>them easily. Huge time saver.

206
00:09:58.799 --> 00:10:01.240
<v Speaker 1>Yeah, history is great, but the real magic happens when

207
00:10:01.240 --> 00:10:03.600
<v Speaker 1>you chain commands, doesn't it. Pipes and redirects.

208
00:10:03.679 --> 00:10:07.360
<v Speaker 2>Oh absolutely, that's where the CLI really shines. Streams, pipes

209
00:10:07.399 --> 00:10:10.240
<v Speaker 2>and redirects let you build complex workflows from simple tools.

210
00:10:10.279 --> 00:10:11.759
<v Speaker 1>Okay, break down redirects first.

211
00:10:11.799 --> 00:10:15.120
<v Speaker 2>The symbol right redirection controls where output goes. By default,

212
00:10:15.159 --> 00:10:17.799
<v Speaker 2>commands send output to your screen, st doo et and

213
00:10:18.000 --> 00:10:21.519
<v Speaker 2>errors to your screen too. Std err redirects stdu to

214
00:10:21.559 --> 00:10:25.320
<v Speaker 2>a file. Overwriting it appends stdog to a file and errors.

215
00:10:25.399 --> 00:10:28.679
<v Speaker 2>You can redirect sddoo using two for example, command to

216
00:10:28.840 --> 00:10:31.360
<v Speaker 2>error dot log. A common trick is command output dot

217
00:10:31.399 --> 00:10:33.919
<v Speaker 2>log two on one, which sends both stdou and st

218
00:10:34.159 --> 00:10:35.039
<v Speaker 2>r to the same file.

219
00:10:35.200 --> 00:10:38.919
<v Speaker 1>Okay, two in one for combined output. Now, pipes, the vertical.

220
00:10:38.639 --> 00:10:42.320
<v Speaker 2>Of art pipes are incredibly powerful. They takes the standard

221
00:10:42.360 --> 00:10:44.559
<v Speaker 2>output of the command on its left and feeds it

222
00:10:44.639 --> 00:10:47.159
<v Speaker 2>directly as standard input to the command on its right.

223
00:10:47.399 --> 00:10:48.919
<v Speaker 2>It lets you chain commands together.

224
00:10:49.039 --> 00:10:50.919
<v Speaker 1>Can you give that example from the source again? The

225
00:10:50.960 --> 00:10:51.879
<v Speaker 1>password file one?

226
00:10:52.039 --> 00:10:54.600
<v Speaker 2>Sure. Let's say you want a sorted list of just

227
00:10:55.120 --> 00:10:58.240
<v Speaker 2>the user names from etcter password. You could do cat

228
00:10:58.279 --> 00:11:01.879
<v Speaker 2>et cetera. Password a SF print one.

229
00:11:01.720 --> 00:11:03.559
<v Speaker 1>Dollars, Sort okay, walk me through.

230
00:11:03.440 --> 00:11:08.480
<v Speaker 2>It, kat, etc. Password displays the file content stdo ut right.

231
00:11:08.919 --> 00:11:13.879
<v Speaker 2>That output is piped into oc ocdash xcdof tells OC

232
00:11:13.919 --> 00:11:16.480
<v Speaker 2>to use a colon as the field separator. Print one

233
00:11:16.519 --> 00:11:19.200
<v Speaker 2>dollar tells OC to print only the first field the

234
00:11:19.279 --> 00:11:20.480
<v Speaker 2>username from each line.

235
00:11:20.519 --> 00:11:23.000
<v Speaker 1>Okay, so now we have just user names exactly.

236
00:11:22.799 --> 00:11:26.279
<v Speaker 2>And that list of user names ox stdout is piped

237
00:11:26.279 --> 00:11:29.000
<v Speaker 2>into the sort command, which sorts them alphabetically. The final

238
00:11:29.039 --> 00:11:30.559
<v Speaker 2>sordid list appears on your screen.

239
00:11:30.919 --> 00:11:33.240
<v Speaker 1>Wow, simple commands, complex result. That's cool.

240
00:11:33.279 --> 00:11:35.759
<v Speaker 2>It really is. That composibility is a core Linux philosophy.

241
00:11:35.799 --> 00:11:38.000
<v Speaker 2>Oh and T is useful too. It reads from standard

242
00:11:38.000 --> 00:11:40.639
<v Speaker 2>input and writes to both standard output and one or

243
00:11:40.639 --> 00:11:42.679
<v Speaker 2>more files like a T junction for data streams.

244
00:11:42.879 --> 00:11:46.000
<v Speaker 1>Handy for seeing output while also logging in. Okay, command

245
00:11:46.039 --> 00:11:49.200
<v Speaker 1>line basics covered. What about installing software? It's different on

246
00:11:49.240 --> 00:11:50.919
<v Speaker 1>different Linux types, right, it is.

247
00:11:50.960 --> 00:11:54.600
<v Speaker 2>That's a major distinction. You generally have two main families

248
00:11:54.679 --> 00:11:58.919
<v Speaker 2>or ecosystems for package management. Family one Debian based systems

249
00:11:59.000 --> 00:12:03.279
<v Speaker 2>think Debian, Oupa to Mint. They use dot deb package files.

250
00:12:03.679 --> 00:12:07.120
<v Speaker 2>The low level tool is dpkg gpeg, but you usually

251
00:12:07.200 --> 00:12:10.120
<v Speaker 2>interact with higher level tools like app get or the

252
00:12:10.200 --> 00:12:15.480
<v Speaker 2>newer often preferred app. They handle dependencies automatically fetching packages

253
00:12:15.480 --> 00:12:18.399
<v Speaker 2>from repositories defined and at capsources dot list.

254
00:12:18.559 --> 00:12:19.879
<v Speaker 1>You're right apped update first.

255
00:12:19.799 --> 00:12:22.360
<v Speaker 2>Usually Yeah, app update or act get update refreshes the

256
00:12:22.360 --> 00:12:25.159
<v Speaker 2>list of available packages from the repositories before you install

257
00:12:25.200 --> 00:12:25.919
<v Speaker 2>or upgrade anything.

258
00:12:26.000 --> 00:12:30.759
<v Speaker 1>Okay, Debianfamily, dot, DPKG, app dot deb files at caapsources

259
00:12:30.799 --> 00:12:31.279
<v Speaker 1>dot list.

260
00:12:31.279 --> 00:12:33.200
<v Speaker 2>What's the other big one, the red Hat based systems.

261
00:12:33.360 --> 00:12:36.639
<v Speaker 2>It's RedHat Enterprise Linux, r h e L, Fedora, Sentos,

262
00:12:36.759 --> 00:12:40.000
<v Speaker 2>sec Linux uses it to They use dot rpm package files.

263
00:12:40.279 --> 00:12:43.440
<v Speaker 2>The low level tool is RPM. The higher level tools

264
00:12:43.480 --> 00:12:46.759
<v Speaker 2>are typically YUM older or its successor, d n F,

265
00:12:47.240 --> 00:12:51.120
<v Speaker 2>s U s C and opencus use zipper like APPED.

266
00:12:51.200 --> 00:12:54.840
<v Speaker 2>These handle dependencies and use repositories configured in places like

267
00:12:54.879 --> 00:12:58.799
<v Speaker 2>at CHAM dot COF or files in at CM dot, rebos, dot.

268
00:12:58.600 --> 00:13:01.919
<v Speaker 1>D SO, yum in package or DNF info.

269
00:13:01.639 --> 00:13:05.799
<v Speaker 2>Package exactly to get information about a package before installing it.

270
00:13:06.399 --> 00:13:09.440
<v Speaker 2>Understanding which system you're on, Debian based or red Hat

271
00:13:09.480 --> 00:13:11.960
<v Speaker 2>based is crucial for managing software effectively.

272
00:13:12.080 --> 00:13:14.559
<v Speaker 1>Makes sense and other useful command line tools for finding

273
00:13:14.559 --> 00:13:15.799
<v Speaker 1>things or searching. Oh, yeah.

274
00:13:16.039 --> 00:13:21.559
<v Speaker 2>Find is incredibly powerful for locating files based on name, type, size, modification, time, permissions,

275
00:13:21.600 --> 00:13:24.120
<v Speaker 2>anything you can think of. And REP is essential for

276
00:13:24.200 --> 00:13:28.000
<v Speaker 2>searching inside text files for specific patterns using regular expressions.

277
00:13:28.080 --> 00:13:29.480
<v Speaker 1>Find and GP got them.

278
00:13:29.600 --> 00:13:29.919
<v Speaker 2>Yeah.

279
00:13:29.960 --> 00:13:34.360
<v Speaker 1>Okay. Let's shift to system administration and crucially security.

280
00:13:34.080 --> 00:13:36.799
<v Speaker 2>Very important topics. Let's start with user and group management.

281
00:13:36.919 --> 00:13:39.440
<v Speaker 2>Linux is multi user from the ground up. Commands like

282
00:13:39.519 --> 00:13:43.120
<v Speaker 2>user rat right, user red, user mod, modify, user BETL delete,

283
00:13:43.320 --> 00:13:46.120
<v Speaker 2>same for groups, group head, group mod group doll managing

284
00:13:46.120 --> 00:13:47.799
<v Speaker 2>who can access the system and what they.

285
00:13:47.679 --> 00:13:50.559
<v Speaker 1>Can do, and the key files here it's set our

286
00:13:50.559 --> 00:13:51.080
<v Speaker 1>pass group.

287
00:13:51.159 --> 00:13:54.720
<v Speaker 2>Yes, it's setter pass roots stores basic user info username,

288
00:13:54.919 --> 00:14:00.000
<v Speaker 2>user id, UID, group id GID, home directory path default show.

289
00:14:00.000 --> 00:14:01.399
<v Speaker 2>Well it's readable by.

290
00:14:01.279 --> 00:14:03.000
<v Speaker 1>Everyone, but not the passwords.

291
00:14:03.399 --> 00:14:06.879
<v Speaker 2>Critically no, the encrypted passwords are an et ceter shadow.

292
00:14:07.240 --> 00:14:09.559
<v Speaker 2>This file is only readable by the root user. That's

293
00:14:09.559 --> 00:14:11.840
<v Speaker 2>a fundamental security features shadow passwords.

294
00:14:11.879 --> 00:14:13.720
<v Speaker 1>Oh okay, shadow for passwords.

295
00:14:13.200 --> 00:14:15.679
<v Speaker 2>What else, ETCETERA group defines the groups and their members,

296
00:14:15.879 --> 00:14:18.759
<v Speaker 2>and it setuskool is neat. It's a skeleton directory. When

297
00:14:18.799 --> 00:14:21.000
<v Speaker 2>you create a new user with USAD, the files in

298
00:14:21.000 --> 00:14:24.120
<v Speaker 2>its siscle are copied into their new home directory, providing

299
00:14:24.200 --> 00:14:26.240
<v Speaker 2>default canfigs or files.

300
00:14:25.720 --> 00:14:27.320
<v Speaker 1>Like default that bashshack maybe.

301
00:14:27.279 --> 00:14:30.720
<v Speaker 2>Exactly insures consistency. And if you want to check password

302
00:14:30.759 --> 00:14:35.279
<v Speaker 2>policies like explanation dates, the change command change h L

303
00:14:35.440 --> 00:14:39.039
<v Speaker 2>username shows password, aging info, last change, expiry date, et

304
00:14:39.080 --> 00:14:39.799
<v Speaker 2>cetera very.

305
00:14:39.759 --> 00:14:43.120
<v Speaker 1>Useful, good one. What about automating task running backups every night?

306
00:14:43.159 --> 00:14:45.639
<v Speaker 2>That's where scheduling comes in. The classic tool is krawn.

307
00:14:45.879 --> 00:14:48.600
<v Speaker 2>It runs commands or scripts on a schedule a minute, hour,

308
00:14:48.720 --> 00:14:49.960
<v Speaker 2>day of month, month, day.

309
00:14:49.840 --> 00:14:52.240
<v Speaker 1>Of week, defined in crontab files yep.

310
00:14:52.759 --> 00:14:54.840
<v Speaker 2>Each user can have their own cron tab and there

311
00:14:54.840 --> 00:14:58.480
<v Speaker 2>are system wide chron jobs defined in et cetera cantab

312
00:14:58.600 --> 00:15:02.960
<v Speaker 2>or files within et ceter used for log rotation, backup

313
00:15:03.080 --> 00:15:04.759
<v Speaker 2>system checks all sorts of things.

314
00:15:04.799 --> 00:15:06.639
<v Speaker 1>And if I just want to run something once.

315
00:15:07.200 --> 00:15:09.279
<v Speaker 2>That's the job for AT. You can say at now

316
00:15:09.279 --> 00:15:11.440
<v Speaker 2>plus one hour and then type the commands you want

317
00:15:11.480 --> 00:15:15.080
<v Speaker 2>or run in an hour. Simple but effective for one off.

318
00:15:14.879 --> 00:15:17.039
<v Speaker 1>Delayed tasks and the system's way.

319
00:15:17.000 --> 00:15:20.480
<v Speaker 2>System timer units. They're the modern approach, more flexible than kron,

320
00:15:20.559 --> 00:15:24.679
<v Speaker 2>integrated with system services offer finer control. They're becoming the

321
00:15:24.759 --> 00:15:27.480
<v Speaker 2>standard way to schedule tasks on systems systems.

322
00:15:27.519 --> 00:15:30.600
<v Speaker 1>Okay, let's talk host security. What are the absolute must knows?

323
00:15:30.759 --> 00:15:33.679
<v Speaker 2>Well, we mentioned shadow passwords, keep et cetera, shadow secure,

324
00:15:33.759 --> 00:15:38.080
<v Speaker 2>that's number one. Number two, use pseudo. Don't log in

325
00:15:38.120 --> 00:15:43.159
<v Speaker 2>as route directly unless absolutely necessary. Pseudo lets authorized users

326
00:15:43.240 --> 00:15:47.159
<v Speaker 2>run specific commands as route or another user temporarily.

327
00:15:46.679 --> 00:15:48.240
<v Speaker 1>And editing the pseudo rules.

328
00:15:48.480 --> 00:15:51.720
<v Speaker 2>Always use vesudo, Never edit et cetera, seriers directly with

329
00:15:51.759 --> 00:15:54.759
<v Speaker 2>the text editor. Pisudo locks the file and performs syntax

330
00:15:54.840 --> 00:15:57.639
<v Speaker 2>checking before saving. This prevents you from making a mistake

331
00:15:57.720 --> 00:16:01.440
<v Speaker 2>that locks you out of Pseudo entirely. Tip the pseudo

332
00:16:01.600 --> 00:16:06.679
<v Speaker 2>absolutely critical another useful security measure, especially during maintenance. Touch

333
00:16:06.879 --> 00:16:10.039
<v Speaker 2>its knowledge in this knowlogy Yeah, if that file exists,

334
00:16:10.159 --> 00:16:12.639
<v Speaker 2>only root can log in. It displays the contents of

335
00:16:12.679 --> 00:16:15.000
<v Speaker 2>the file to users trying to log in non route.

336
00:16:15.159 --> 00:16:17.120
<v Speaker 2>It's a simple way to keep users off while you're

337
00:16:17.159 --> 00:16:19.679
<v Speaker 2>doing major work. Just remember to remove it when you're done.

338
00:16:19.799 --> 00:16:25.200
<v Speaker 2>Good temporary lockout and generally minimize your attack surface. Turn

339
00:16:25.240 --> 00:16:29.000
<v Speaker 2>off any network services you don't absolutely need. Every listening

340
00:16:29.039 --> 00:16:30.679
<v Speaker 2>service is a potential entry point.

341
00:16:30.879 --> 00:16:33.720
<v Speaker 1>Solid advice. How about securing data and communications?

342
00:16:34.039 --> 00:16:39.120
<v Speaker 2>Encryption SSH secure shell that's the standard for secure remote logins,

343
00:16:39.159 --> 00:16:42.639
<v Speaker 2>command execution, and file transfers like cit AP or.

344
00:16:42.679 --> 00:16:44.720
<v Speaker 1>SFTP uses key pairs right.

345
00:16:44.600 --> 00:16:47.679
<v Speaker 2>Yes, public private key pairs. You generate them with shurch keysen.

346
00:16:47.919 --> 00:16:50.440
<v Speaker 2>Put your public key in the dotch authorized keys file

347
00:16:50.519 --> 00:16:53.279
<v Speaker 2>on the server, keep your private key safe, and you

348
00:16:53.320 --> 00:16:56.039
<v Speaker 2>get secure often passwordless.

349
00:16:55.360 --> 00:16:57.240
<v Speaker 1>Access and graphical apps remotely.

350
00:16:57.519 --> 00:17:01.039
<v Speaker 2>SSH can do x eleven forwarding on a graphical program

351
00:17:01.039 --> 00:17:03.360
<v Speaker 2>on a remote server, but have its window displayed securely

352
00:17:03.399 --> 00:17:04.400
<v Speaker 2>on your local desktop.

353
00:17:04.640 --> 00:17:07.319
<v Speaker 1>Very handy, cool and for encrypting files themselves.

354
00:17:07.440 --> 00:17:12.160
<v Speaker 2>Et IPG or GPG. It's the standard tool for encrypting, decrypting, signing,

355
00:17:12.240 --> 00:17:16.640
<v Speaker 2>and verifying files and messages using public key cryptography. Essential

356
00:17:16.680 --> 00:17:18.920
<v Speaker 2>for data confidentiality and integrity.

357
00:17:19.079 --> 00:17:22.759
<v Speaker 1>GPG Yeah, got it? Any other useful DMin security tools.

358
00:17:22.799 --> 00:17:25.359
<v Speaker 2>To end attention wallets, you send a quick message to

359
00:17:25.440 --> 00:17:29.160
<v Speaker 2>the terminals of all logged in users. Good for broadcasting systems,

360
00:17:29.160 --> 00:17:32.920
<v Speaker 2>shut down warnings, okay, and end map. It's a powerful

361
00:17:33.000 --> 00:17:36.000
<v Speaker 2>network scanner used to discover hosts on a network, see

362
00:17:36.000 --> 00:17:39.640
<v Speaker 2>which ports are open, identify services running. It's essential for

363
00:17:39.720 --> 00:17:42.079
<v Speaker 2>security auditing, understanding what's exposed.

364
00:17:42.200 --> 00:17:45.559
<v Speaker 1>Network mapping makes sense. Wow, we've covered a lot of ground.

365
00:17:45.640 --> 00:17:48.920
<v Speaker 1>We really have from the boot process, the file system,

366
00:17:48.960 --> 00:17:53.160
<v Speaker 1>structure of the command line, power package management, user admin security. Oh,

367
00:17:53.200 --> 00:17:54.640
<v Speaker 1>it's a pretty comprehensive.

368
00:17:54.200 --> 00:17:56.119
<v Speaker 2>Look under the hood, it is, and like you said,

369
00:17:56.240 --> 00:17:59.720
<v Speaker 2>drawing from that LPIC one material gives a really solid

370
00:17:59.759 --> 00:18:03.319
<v Speaker 2>press pactical foundation. But you know, this deep dive, it's

371
00:18:03.359 --> 00:18:06.519
<v Speaker 2>really just scratching the surface. Linux is vast, but hopefully

372
00:18:06.599 --> 00:18:09.640
<v Speaker 2>this gives you a much better framework for understanding how

373
00:18:09.680 --> 00:18:13.200
<v Speaker 2>these core pieces work together. The key is to keep exploring,

374
00:18:13.359 --> 00:18:15.240
<v Speaker 2>keep asking questions.

375
00:18:14.880 --> 00:18:18.680
<v Speaker 1>Definitely, and as you do, maybe consider this, how do

376
00:18:18.759 --> 00:18:21.759
<v Speaker 1>those fundamental Linux principles like modularity, you know, six v

377
00:18:21.839 --> 00:18:25.160
<v Speaker 1>in it versus system or using separate partitions. How does

378
00:18:25.200 --> 00:18:27.799
<v Speaker 1>that and the reliance on plaintext canfig files we saw

379
00:18:27.799 --> 00:18:31.200
<v Speaker 1>on etc and the FHS contribute to its incredible longevity

380
00:18:31.200 --> 00:18:32.720
<v Speaker 1>and adaptability.

381
00:18:32.079 --> 00:18:35.599
<v Speaker 2>Right from tiny embedded systems to massive cloud exactly.

382
00:18:35.640 --> 00:18:38.160
<v Speaker 1>So, what other sort of hidden design ideas might be

383
00:18:38.200 --> 00:18:40.359
<v Speaker 1>shaping the tech you use every day and how can

384
00:18:40.480 --> 00:18:43.279
<v Speaker 1>understanding them empower you? Something to think about
