Latest / CyberSecurity Summary / Linux+ and LPIC-1 Guide to Linux Certification, Loose-leaf Version (MindTap Course List)
Transcript
- 0:00Speaker 1: You know, it's kind of incredible when you stop and
- 0:02Speaker 1: think about it. So much of our digital world, I
- 0:06Speaker 1: mean really, so much is built on something most people
- 0:09Speaker 1: barely notice. Linux. You might not realize it, but it's
- 0:13Speaker 1: literally everywhere your Internet router, proble, Linux, Android phone, yep,
- 0:18Speaker 1: Linux kernel, even like smart thermostats and stuff. It's this
- 0:22Speaker 1: silent workhorse.
- 0:24Speaker 2: It really is the backbone for a huge amount of tech.
- 0:27Speaker 1: Okay, so let's unpack this a bit, because, you know,
- 0:29Speaker 1: for something that's so pervasive, jumping into Linux for the
- 0:32Speaker 1: first time, it can feel really complex, like looking at
- 0:34Speaker 1: this massive technical diagram.
- 0:36Speaker 2: Definitely daunting at first glance.
- 0:38Speaker 1: Yeah, but what if what if understanding just a few
- 0:41Speaker 1: core ideas could actually give you this like superpower, real
- 0:44Speaker 1: control and insight into how these digital systems actually work.
- 0:48Speaker 2: Well, that's exactly what we're aiming for today. We've gone
- 0:50Speaker 2: through a pretty hefty Linux certification guide and pulled out
- 0:54Speaker 2: the absolute foundational stuff you need. Our mission basically is
- 0:58Speaker 2: to demistify the Linux five system, gets you comfortable with
- 1:01Speaker 2: some key command line tools, show you how to manage
- 1:05Speaker 2: running programs, the actual processes, and also lay down the
- 1:08Speaker 2: groundwork for essential security.
- 1:10Speaker 1: So The goal isn't just memorizing commands.
- 1:12Speaker 2: No, not at all. It's about understanding how it all
- 1:14Speaker 2: fits together, turning that feeling of whoa, this is too
- 1:17Speaker 2: much into those aha moments, really getting how Linux operates
- 1:22Speaker 2: under the hood.
- 1:22Speaker 1: All right, let's dive in. Where do we start? The
- 1:25Speaker 1: ground floor?
- 1:26Speaker 2: The ground floor is perfect. Yeah, let's talk about how
- 1:28Speaker 2: Linux organizes information. It's structure unlike say Windows, where you
- 1:32Speaker 2: often see different drives like CD.
- 1:34Speaker 1: Whatever, multiple partitions.
- 1:36Speaker 2: Yeah, Linux uses a single unified directory tree. Everything starts
- 1:39Speaker 2: from the root, represented by a forward slash trick. And
- 1:42Speaker 2: this whole structure follows a standard. It's called the File
- 1:45Speaker 2: System Hierarchy Standard or FHS.
- 1:49Speaker 1: FHS.
- 1:49Speaker 2: Okay, so it's like a blueprint, exactly standardized blueprint. So
- 1:53Speaker 2: whether you're on Fedora or open sets or a Buntu,
- 1:56Speaker 2: you generally know where to look for things. Core system
- 1:58Speaker 2: can fig files, they'll be in its own user home
- 2:01Speaker 2: directories under home the kernel itself. Boot files they live
- 2:05Speaker 2: in boot. This consistency is well, it's incredibly valuable. Makes
- 2:09Speaker 2: an administration much more predictable.
- 2:11Speaker 1: Like a universal address system for files. Then, and the
- 2:14Speaker 1: main way you navigate this is using the shell right
- 2:17Speaker 1: Bash usually yeah.
- 2:18Speaker 2: The basa shell is your command line interface. It's where
- 2:21Speaker 2: you type your commands. But it's worth asking, you know
- 2:25Speaker 2: what actually happens when you type a command and press enter.
- 2:28Speaker 2: How does the shell process that?
- 2:29Speaker 1: Good question?
- 2:30Speaker 2: That uses something called file descriptors. Every command inherently has
- 2:33Speaker 2: three of these, standard input or stend in okay, input
- 2:37Speaker 2: like the keyboard usually yeah. By default, stending comes from
- 2:40Speaker 2: your keyboard.
- 2:41Speaker 1: Yeah.
- 2:41Speaker 2: Then their standard output stand out, which is the normal
- 2:44Speaker 2: result of the command, and standard error stender for any
- 2:48Speaker 2: error messages. And those both go to the screen by default. Yes,
- 2:51Speaker 2: stid out and stender both display on your terminal. But
- 2:54Speaker 2: and this is where gets really interesting. You can mess
- 2:56Speaker 2: with these. You can redirect them.
- 2:58Speaker 1: Redirect how so Well.
- 3:00Speaker 2: Instead of sending the output to the screen, you can
- 3:02Speaker 2: send it directly into a file. You use the symbol
- 3:05Speaker 2: to overwrite a file or to just add the output
- 3:08Speaker 2: to the end of it.
- 3:08Speaker 1: Ah okay, So you can save command results easily.
- 3:12Speaker 2: Exactly, and even more powerful, you can pipe output. Use
- 3:16Speaker 2: the symbol the vertical bar to take the standard output
- 3:19Speaker 2: of one command and use it directly as the standard
- 3:21Speaker 2: input for another command.
- 3:23Speaker 1: WHOA Okay, So you can chain commands together precisely.
- 3:27Speaker 2: You build pipelines, filter data, process text, complex operations from
- 3:31Speaker 2: simple building blocks. It's fundamental to the Unix philosophy. Really,
- 3:35Speaker 2: it makes you way more efficient.
- 3:37Speaker 1: I could see that. Well, let's be AHH has those
- 3:39Speaker 1: wildcard things too, right, like oh yeah.
- 3:41Speaker 2: Meta characters, Yeah, matches anything. Media matches a single character.
- 3:46Speaker 2: Huge time savers when you're looking for files or working
- 3:48Speaker 2: with multiple files at once. Knowing redirection, piping and meta
- 3:52Speaker 2: characters really unlocks the command line.
- 3:54Speaker 1: Okay, So with that power, what are the essential commands for? Just,
- 3:57Speaker 1: you know, interacting with files day to day, listing them,
- 4:00Speaker 1: seeing what's inside?
- 4:01Speaker 2: All right, Well, you'll live in l's. That's for listing
- 4:03Speaker 2: directory contents. Just l's gives you names, simple enough, but
- 4:06Speaker 2: l's L is often what you really want. The LLL
- 4:08Speaker 2: gives you a long listing shows permissions, owner, group size, modification, date,
- 4:15Speaker 2: tons is useful info.
- 4:16Speaker 1: Okay, that's the detailed view. If you're not even sure
- 4:19Speaker 1: what kind of file something is like? Is it text?
- 4:21Speaker 1: Is it a program?
- 4:22Speaker 2: A good one? For that? You use the file command.
- 4:25Speaker 2: Just file in a file name. It'll inspect the file
- 4:28Speaker 2: until you it's best guess ye asci text ELF sixty
- 4:32Speaker 2: four bit executable symbolic link, that kind of thing. It's
- 4:35Speaker 2: like a quick detective tool neat.
- 4:37Speaker 1: Okay, So we can list files, identify them. What about
- 4:42Speaker 1: actually looking inside them? Assuming they're text files?
- 4:44Speaker 2: Sure, for text you've got a few options. The cat
- 4:47Speaker 2: just concatenates and displays the whole file to the screen.
- 4:50Speaker 2: Quick and dirty.
- 4:50Speaker 1: Okay. Good for short files, maybe.
- 4:52Speaker 2: Yeah, exactly. For longer files, more is useful. It shows
- 4:55Speaker 2: the file one page at a time. You hit spacebar
- 4:57Speaker 2: to go down a page, Enter for a line, que quit.
- 5:00Speaker 2: It even shows you the percentage viewed.
- 5:02Speaker 1: Got it?
- 5:03Speaker 2: But honestly, less is often preferred. There's like more but
- 5:07Speaker 2: more powerful. You can scroll backwards as well as forwards
- 5:10Speaker 2: using arrow keys or page upage down. Much more flexible
- 5:14Speaker 2: For examining long files like logs.
- 5:16Speaker 1: Less is more and searching within files if I'm looking
- 5:19Speaker 1: for a specific word or error message.
- 5:21Speaker 2: That's g REP stands for a global regular expression print.
- 5:25Speaker 2: You give it a pattern and a file name, and
- 5:26Speaker 2: it prints lines that match. Incredibly powerful, especially with the
- 5:30Speaker 2: log files. There's also e g REP for extended patterns
- 5:33Speaker 2: and f GP, which is faster for simple fixed strengths
- 5:35Speaker 2: because it doesn't do the complex pattern matching crap.
- 5:38Speaker 1: Okay, that sounds indispensable for troubleshooting.
- 5:41Speaker 2: Oh absolutely, yeah, And then you have your basics dot
- 5:43Speaker 2: CP to copy files, PP for copy, MV to move
- 5:47Speaker 2: files or actually to rename them too.
- 5:49Speaker 1: The rename okay, RM to remove.
- 5:52Speaker 2: Files, be careful that one right RM is delete. And
- 5:54Speaker 2: for directories ramder deer to make a directory, and are
- 5:57Speaker 2: malage to remove an empty directory.
- 5:58Speaker 1: Okay, standard stuff. Now you mentioned linking earlier, hard links
- 6:02Speaker 1: and symbolic links. That sounds important, very important concept. Yeah.
- 6:05Speaker 2: Linking lets you have multiple names point to the same
- 6:08Speaker 2: actual data. Save space. Helps organize two types hard links
- 6:12Speaker 2: and symbolic links.
- 6:14Speaker 1: What's the difference?
- 6:15Speaker 2: Okay, A hard link made with LNN filename link name
- 6:19Speaker 2: is basically just another directory entry pointing to the exact
- 6:22Speaker 2: same underlying data block on the disc card air the
- 6:26Speaker 2: inode technically.
- 6:27Speaker 1: So like two names for the very same file data exactly.
- 6:31Speaker 2: And because of that, hard links have to be on
- 6:33Speaker 2: the same filesystem, the same disc partition. If you delete
- 6:36Speaker 2: the original filename, the data is still there as long
- 6:38Speaker 2: as a hard link exists. That data only goes away
- 6:41Speaker 2: when the last link pointing to it is removed.
- 6:43Speaker 1: Interesting data sticks around. What about symbolic links? Then?
- 6:46Speaker 2: Symbolic links or sim links made with LNS target file
- 6:49Speaker 2: link name are different. They're more like shortcuts and windows
- 6:52Speaker 2: or aliases on a Mac. A sim link is actually
- 6:55Speaker 2: a tiny file that just contains the path to the
- 6:57Speaker 2: target file or directory.
- 6:58Speaker 1: Ah, so it's just a pointer exactly, It's.
- 7:00Speaker 2: Just a pointer. Because of this, sim links can point
- 7:03Speaker 2: across different filesystems. But the downside is if you delete
- 7:07Speaker 2: or move the original target file, the semb link becomes broken.
- 7:11Speaker 2: It points to nothing.
- 7:12Speaker 1: Okay, So why choose one over the other. When would
- 7:15Speaker 1: you use a hard link versus a symbolic one?
- 7:17Speaker 2: Good question. It's about resilience versus flexibility. Hard links give
- 7:22Speaker 2: you that data resilience on a single file system. The
- 7:25Speaker 2: data won't disappear until all names are gone. Symbolic links
- 7:28Speaker 2: give you massive flexibility, linking across disks, creating easy to
- 7:32Speaker 2: update pointers, organizing complex structures without moving the actual data around.
- 7:36Speaker 2: You choose based on whether you need the data backup
- 7:39Speaker 2: inherent in hard links or the organizational flexibility of semb
- 7:42Speaker 2: links makes sense.
- 7:43Speaker 1: Resilience on one desk versus flexible pointing anywhere pretty much. Okay,
- 7:46Speaker 1: so we've mapped the territory with fahs. We've got tools
- 7:49Speaker 1: like l's kat grap ln. But any shared system needs rules,
- 7:53Speaker 1: right Who gets to actually use these tools on which files?
- 7:57Speaker 1: That sounds like permissions precisely.
- 7:59Speaker 2: File permissions are the aid keepers. Every single file and
- 8:02Speaker 2: directory in Linux has permissions defined for three categories of users.
- 8:06Speaker 1: Three categories, yep.
- 8:07Speaker 2: First, the actual user who owns the file, usually the
- 8:10Speaker 2: person who created it. Second, the group that owns the file,
- 8:13Speaker 2: think of groups like teams or departments. And third everyone
- 8:16Speaker 2: else on the system, often just called.
- 8:18Speaker 1: Other user group other. Okay, and what permissions can they have.
- 8:23Speaker 2: For each of those three categories? User group, other? You
- 8:26Speaker 2: can grant or deny three basic permissions read, write, and execute,
- 8:30Speaker 2: often shown as r W and X.
- 8:33Speaker 1: Read write execute r WX makes sense for files, Read
- 8:37Speaker 1: means view, right means change. Execute means run if it's
- 8:41Speaker 1: a program. What about for directories? Execute seems weird for
- 8:45Speaker 1: a directory.
- 8:46Speaker 2: That's a key point. For a directory, execute permission means
- 8:49Speaker 2: something different. It means you're allowed to enter the directory
- 8:52Speaker 2: like using the CD command. If you also have red
- 8:54Speaker 2: permission on the directory, you can list its contents with LS,
- 8:57Speaker 2: but without execute you can't even get inside.
- 9:00Speaker 1: Ah, okay, execute, let's you traverse into the directory. Got it?
- 9:03Speaker 1: So how do we change these permissions.
- 9:05Speaker 2: With the chmud command change mode? You can use symbolic notation,
- 9:09Speaker 2: which is maybe more intuitive at first, like chmud U
- 9:12Speaker 2: plus x file name adds execute permission for the user,
- 9:15Speaker 2: GW removes right for the group. Jerry R sets other
- 9:18Speaker 2: permissions to only read.
- 9:20Speaker 1: User, group other dot. Yougo plus minus equals okay.
- 9:24Speaker 2: Or and this is very common, you use numeric occal codes.
- 9:27Speaker 2: Each permission gets a number. Read is four, right is
- 9:30Speaker 2: to execute is one. You add them up for each category.
- 9:33Speaker 1: So read and wright would be four plus two equals six.
- 9:35Speaker 2: Exactly, read write execute is four plus two plus one
- 9:38Speaker 2: equal seven. Read and execute is four plus one eqals five.
- 9:41Speaker 2: So the very common permission set is to mode seven
- 9:44Speaker 2: five file.
- 9:45Speaker 1: Name seven fifty five okay. Seven for the user read
- 9:47Speaker 1: write execute, five for the group read execute, and five
- 9:51Speaker 1: for others read.
- 9:52Speaker 2: Execute You got it. It seems our kane at first,
- 9:54Speaker 2: but you get used to it fast and getting permissions wrong.
- 9:57Speaker 2: It's a huge source of security problem, so understanding mode
- 9:59Speaker 2: is critical definitely.
- 10:00Speaker 1: Now I remember reading about special permissions too, suid and
- 10:03Speaker 1: things like that.
- 10:04Speaker 2: Ah. Yes, Beyond the basic arius there are special permission bits.
- 10:07Speaker 2: The SUID bit or set user id bit is fascinating.
- 10:11Speaker 2: If you set this on an executable.
- 10:13Speaker 1: File only executables, right when a.
- 10:15Speaker 2: Regular user runs that file, the process runs not with
- 10:18Speaker 2: their permissions, but with the permissions of the owner of
- 10:21Speaker 2: the file.
- 10:22Speaker 1: WHOA why would you want that?
- 10:24Speaker 2: Think about the password command you need to change your password,
- 10:28Speaker 2: which involves modifying the protected etsetter shadow file. You don't
- 10:31Speaker 2: have permission right there, but the password program is owned
- 10:34Speaker 2: by Route and has the suid bit set, so when
- 10:38Speaker 2: you run it, it temporarily runs as Route just to
- 10:41Speaker 2: change your password safely.
- 10:42Speaker 1: Ah okay, controlled privileged escalation. Very clever.
- 10:46Speaker 2: Very There's also the SGID bit set group ID, which
- 10:50Speaker 2: works similarly for group permissions and is especially useful on directories.
- 10:55Speaker 2: If SGID is set on a directory, any new file
- 10:58Speaker 2: or subdirectory created inside it automatically inherits the directory's group ownership,
- 11:03Speaker 2: not the user's primary group. Great for shared project folders.
- 11:06Speaker 1: Keeps everything in the right group automatically.
- 11:08Speaker 2: Nice and the sticky bit. You often see this on
- 11:11Speaker 2: shared directories like tabaquin. If the sticky bit is set
- 11:14Speaker 2: on a directory, a user can only delete or rename
- 11:16Speaker 2: files within that directory if they own the file, even
- 11:19Speaker 2: if they have right permission on the directory itself.
- 11:21Speaker 1: So I can put files in TAMP. You can put
- 11:23Speaker 1: files in TAMP, but I can't delete your files, even
- 11:27Speaker 1: though we can both write to the directory exactly.
- 11:30Speaker 2: It prevents users from messing with each other's stuff in
- 11:33Speaker 2: a common space like a bubble locker room.
- 11:35Speaker 1: Okay, this is getting deep. What about protecting files even
- 11:39Speaker 1: from accidental deletion by the root user? If root can
- 11:44Speaker 1: bypass normal permissions.
- 11:46Speaker 2: That's where file attributes come in. Yeah, managed by the
- 11:48Speaker 2: check at command. These are separate from the standard artob permissions.
- 11:51Speaker 2: One really important attribute is immutable. If you set chat
- 11:55Speaker 2: tree plus i on.
- 11:57Speaker 1: A file, plus i for immutable, right, that.
- 11:59Speaker 2: File can be modified, deleted, renamed, or even linked to
- 12:03Speaker 2: even by the root user until someone explicitly removes that attribute.
- 12:07Speaker 2: With chat tree, it's like a superlock essential for protecting
- 12:10Speaker 2: really critical system configuration files.
- 12:12Speaker 1: Wow. Okay, so chatplus i is serious protection.
- 12:15Speaker 2: It is an extra layer against mistakes or even malicious actions.
- 12:18Speaker 1: All right, we've covered the static landscape, files, directories, permissions, attributes.
- 12:23Speaker 1: But Linux isn't static, right, It's alive with running programs processes.
- 12:27Speaker 1: How do we manage those?
- 12:28Speaker 2: Yeah? Processes are the dynamic part. Everything running is a process.
- 12:32Speaker 2: Each one gets a unique number. It's process ID.
- 12:35Speaker 1: Or PID PID unique number.
- 12:37Speaker 2: And every process except the very first one also has
- 12:40Speaker 2: a parent process ID, the PPID that's the PID of
- 12:44Speaker 2: the process that started it.
- 12:45Speaker 1: So there's a family tree exactly.
- 12:47Speaker 2: You can trace the lineage of any process back up
- 12:50Speaker 2: through its parents. And the ultimate ancestor PID one is
- 12:54Speaker 2: the NIT process or on most modern systems systemed it's
- 12:58Speaker 2: the first process started by the current a boot, and
- 13:01Speaker 2: it's the ancestor of everything else.
- 13:02Speaker 1: Can you actually see that tree?
- 13:04Speaker 2: Yep? The street command displays it visually. Should you which
- 13:07Speaker 2: process spond? Which really helpful for understanding relationships, especially something
- 13:11Speaker 2: unexpected is running?
- 13:13Speaker 1: Cool? So how do we just see what's running now?
- 13:15Speaker 2: The main command is PS for Process status. Just PS
- 13:18Speaker 2: by itself usually shows only processes running in your current terminal.
- 13:22Speaker 1: Not very useful, Okay, So what options do we need?
- 13:24Speaker 2: Common ones are psee to show every process on the system,
- 13:28Speaker 2: or PSO, which is a popular combination, giving lots of
- 13:30Speaker 2: detail in the user friendly format. Ps gives a long,
- 13:34Speaker 2: more technical format. PSF gives a full format, often showing
- 13:39Speaker 2: the parent PID.
- 13:40Speaker 1: PSO seems like a good starting point then, but that's
- 13:43Speaker 1: just a snapshot, right. What if I want to see
- 13:45Speaker 1: what's happening in real time, like which process is suddenly
- 13:48Speaker 1: eating all the CPU?
- 13:49Speaker 2: Ah for that? Your go to is TOP. It's a dynamic,
- 13:53Speaker 2: real time view of running processes. It updates continuously, usually
- 13:57Speaker 2: sorted by CPU usage. By default, you can see memory usage,
- 14:01Speaker 2: uptime load average. It's the system administrator's dashboard TOP.
- 14:05Speaker 1: That's how you spot a runaway.
- 14:06Speaker 2: Process exactly identify the resource ocs now. Once you see
- 14:10Speaker 2: these processes, how do you manage them? Sometimes the command
- 14:12Speaker 2: takes a long time and it just sits there in
- 14:14Speaker 2: your terminal right the.
- 14:15Speaker 1: Foreground Yeah, ties up the prompt.
- 14:17Speaker 2: You can run a command in the background by just
- 14:19Speaker 2: adding an amper sand at the end of theman line.
- 14:22Speaker 2: Just then hit enter. The command starts, The system gives
- 14:25Speaker 2: you a job number and the PID, and you immediately
- 14:28Speaker 2: get your shell prompt back. You can keep working. Simple
- 14:31Speaker 2: but incredibly useful for multitasking.
- 14:33Speaker 1: Backgrounding with enter. Okay. What if a process foreground or
- 14:37Speaker 1: background is stuck or misbehaving, how do I stop it?
- 14:41Speaker 2: You kill it using the kill command. But kill is
- 14:44Speaker 2: a bit of a misnomer. You're actually sending a signal
- 14:47Speaker 2: to the.
- 14:47Speaker 1: Process, signals like telling it what to do, kind of.
- 14:51Speaker 2: There are many different signals. The default signal if you
- 14:53Speaker 2: just type kill pid is sigturn signal number fifteen. This
- 14:57Speaker 2: is a plight request, please terminate gracefully. It gives the
- 15:00Speaker 2: process a chance to shut down cleanly, save data, release resources.
- 15:04Speaker 1: Hey, the nice way sigterm right.
- 15:06Speaker 2: But sometimes a process ignores sigterm or is totally frozen.
- 15:09Speaker 2: Then you bring out the big gun, sigkill signal number nine,
- 15:13Speaker 2: kill number nine PID.
- 15:14Speaker 1: The famous kill mon of nine.
- 15:15Speaker 2: That's the one sigkill is into requests and order directly
- 15:18Speaker 2: to the colonel, terminate this process immediately. Now the colonel
- 15:22Speaker 2: just yanks its resources away. It doesn't get a chance
- 15:25Speaker 2: to clean up. It's forceful. Use it when sigterm fails.
- 15:27Speaker 1: Hard reset for a process. Got it? What about running
- 15:30Speaker 1: things later? Not now, not in the background, but like
- 15:33Speaker 1: tomorrow at two.
- 15:34Speaker 2: Am, scheduling for one time tasks in the future. You
- 15:39Speaker 2: use the at command and it's damon at FALB. You'd
- 15:42Speaker 2: say something like it two point am tomorrow, hit enter,
- 15:44Speaker 2: then type the commands you want to run one per line,
- 15:47Speaker 2: Press foryal plus D when you're done, and it just
- 15:50Speaker 2: remembers ye AT wakes up at the specified time and
- 15:53Speaker 2: runs your commands. It gives you a job I D
- 15:55Speaker 2: when you schedule it, so you can check the queue
- 15:56Speaker 2: of that queue or remove a job with that room.
- 15:58Speaker 1: At for one off future ta asks. What about repetitive
- 16:01Speaker 1: stuff like run a backupscript every.
- 16:03Speaker 2: Night for recurring tasks. That's the job of the kron
- 16:05Speaker 2: demon Trond. It reads configuration files called kron tables or
- 16:10Speaker 2: kron tabs corontabs.
- 16:11Speaker 1: Okay.
- 16:11Speaker 2: Each line in a corontab specifies a schedule in a
- 16:13Speaker 2: command as six fields minute zero five nine hour zero
- 16:17Speaker 2: twenty three, day of the month, one thirty one month,
- 16:20Speaker 2: one twelve, day of the week zero seven we're both
- 16:23Speaker 2: zero zero and seven or Sunday, and then the command to.
- 16:25Speaker 1: Run whoa okay, minute, our day, month, day of week.
- 16:28Speaker 1: Command precise scheduling.
- 16:30Speaker 2: Very precise. There's a system wide corontab usually et cetera
- 16:34Speaker 2: tab and each user can also have their own personal
- 16:37Speaker 2: contab managed with the corontab e command. This is how
- 16:40Speaker 2: cissimmins automate pretty much all routine maintenance.
- 16:43Speaker 1: Kron for automation makes sense. Now, all this process management,
- 16:47Speaker 1: file ownership, permissions, it all comes back to users in
- 16:51Speaker 1: groups right.
- 16:52Speaker 2: Absolutely. Linux is fundamentally a multi user system. It needs
- 16:56Speaker 2: to know who is who. Every user account has a
- 16:59Speaker 2: unique user ID or UID. Every group has a unique
- 17:02Speaker 2: group ID or GID.
- 17:04Speaker 1: UID and GID numbers identify users and groups.
- 17:07Speaker 2: Correct the mapping between user names and UIDs. Plus basic
- 17:11Speaker 2: info like their home directory and default login shell is
- 17:14Speaker 2: stored in the et cetera pass wood.
- 17:15Speaker 1: File, et cetera. Past I've heard of thought, does it
- 17:17Speaker 1: actually have passwords in it?
- 17:18Speaker 2: Not anymore. That used to be the case long ago,
- 17:21Speaker 2: big security risk. Now the encrypted passwords, along with password
- 17:24Speaker 2: aging policies and stuff like that, are stored in a separate,
- 17:26Speaker 2: highly protected file etcetera shadow. Only rood can read.
- 17:30Speaker 1: It, ETCETERA shadow for the secret stuff. Good? What about groups?
- 17:33Speaker 2: Group definitions? The group name, the GID and which users
- 17:37Speaker 2: are members of that group are in the etcetera group file.
- 17:40Speaker 1: Et cetera pass good, etcetera shadow etcetera group, the core
- 17:43Speaker 1: identity file.
- 17:43Speaker 2: Those of the main ones. Yeah. Yeah. When you create
- 17:45Speaker 2: a file, its owner is your UID and its group
- 17:48Speaker 2: owner is typically your primary group, which is also defined
- 17:51Speaker 2: in etcetera. Pass route. Admins use commands like userrad, user mod,
- 17:55Speaker 2: pass route group pad group mod to manage all these accounts.
- 17:58Speaker 1: And groups, and you mention groups being important for permissions. Yeah,
- 18:02Speaker 1: any specific examples like that? Wheel group, right.
- 18:05Speaker 2: The Wheel group is a common convention on many systems.
- 18:08Speaker 2: Often only users who are members of the Wheel group
- 18:11Speaker 2: are allowed to use commands like sue to switch user
- 18:14Speaker 2: often to root, or pseudo to execute a command as
- 18:17Speaker 2: another user, again usually root.
- 18:19Speaker 1: So being in wheel gives you admin privileges.
- 18:21Speaker 2: Essentially, it's a mechanism for delegating admin privileges. Instead of
- 18:25Speaker 2: giving everyone the root password, you put trusted users in
- 18:28Speaker 2: the Wheel group and configure pseudo to let them run
- 18:31Speaker 2: specific commands as root, usually after re entering their own password.
- 18:34Speaker 2: Much more secure and.
- 18:35Speaker 1: Accountable delegated administration via groups like Wheel. Okay, that makes
- 18:39Speaker 1: a lot of sense.
- 18:40Speaker 2: It's fundamental to secure multi user management.
- 18:43Speaker 1: Okay, So managing a Linux system isn't just about the
- 18:46Speaker 1: here and now creating files, running processes. It's also about
- 18:49Speaker 1: long term health and security. What are the key things there?
- 18:53Speaker 1: Logging seems important.
- 18:54Speaker 2: Oh, absolutely critical. System logging is basically your system's diary
- 18:58Speaker 2: or memory. Everything that happens, especially background services, are demons, records, messages, information, warnings,
- 19:06Speaker 2: errors into log files.
- 19:07Speaker 1: Where do these logs usually live?
- 19:09Speaker 2: The standard location is under the varlog directory. You'll find
- 19:12Speaker 2: logs or system messages, authentication attempts specific services like the
- 19:16Speaker 2: web server or mail server. It's the first place you
- 19:19Speaker 2: look when something goes wrong.
- 19:21Speaker 1: And how are these logs managed? What creates them?
- 19:24Speaker 2: On modern Linux systems, the primary mechanism is often the
- 19:27Speaker 2: system to journal damon journal. It collects logs from everywhere
- 19:30Speaker 2: into a structured binary format. You typically query it using
- 19:34Speaker 2: the journal diical.
- 19:35Speaker 1: Command Journal diaryl Okay.
- 19:37Speaker 2: Mini systems also still run older logging services like rzslogged,
- 19:42Speaker 2: which reads messages sometimes from the journal, sometimes directly, and
- 19:46Speaker 2: writes them out to those traditional text files in varlog
- 19:49Speaker 2: based on rules in its configuration. So you might interact
- 19:52Speaker 2: with both.
- 19:52Speaker 1: Logs tell the story. But they must get huge, right?
- 19:55Speaker 1: Do they just fill up the disk?
- 19:57Speaker 2: They definitely can, That's why Linux has a utility caused aggretate.
- 20:01Speaker 2: It runs periodically, usually via cron. Based on its configuration,
- 20:05Speaker 2: it will automatically archive old log files, maybe renamed cislog
- 20:09Speaker 2: to cislog dot one, compress them cislog dot one dot chezy,
- 20:13Speaker 2: and eventually delete the oldest ones.
- 20:15Speaker 1: Ah. The digital janitor we talked about earlier keeps things tidy.
- 20:19Speaker 2: Exactly, prevents logs from consuming all your disk space, vital
- 20:22Speaker 2: for long term stability.
- 20:23Speaker 1: Okay, logs help us understand what happened? What about preventing
- 20:26Speaker 1: bad things from happening, especially from the network firewalls.
- 20:30Speaker 2: Firewalls are your primary network defense. They act as a gatekeeper,
- 20:34Speaker 2: inspecting network traffic coming into or going out of your
- 20:36Speaker 2: system and deciding whether to allow or block it based
- 20:40Speaker 2: on a set of rules.
- 20:40Speaker 1: How do you set up these rules?
- 20:42Speaker 2: Several tools exist. The classic low level tool is imptables,
- 20:46Speaker 2: very powerful but complex syntax. Many distributions now offer easier
- 20:50Speaker 2: to use front ends like two uncomplicated firewall or firewall
- 20:54Speaker 2: CMD part of firewall common on red hat based systems.
- 20:57Speaker 2: They manage the underlying iptables or newer NF table rules for.
- 21:00Speaker 1: You who firewall cmd okay and what can the rules
- 21:04Speaker 1: do just allow or block?
- 21:05Speaker 2: They can do more. Typically, rules specify criteria like source, destination,
- 21:09Speaker 2: IP address, port, number, protocol, and an action. Actions include
- 21:13Speaker 2: allow let the packet through, de ROPI to silently discard
- 21:16Speaker 2: the packet the center doesn't know is blocked, reject discard
- 21:20Speaker 2: the packup and send an error message back like port
- 21:22Speaker 2: and reachable or sometimes log record the back at details,
- 21:25Speaker 2: but still allow or block it based on subsequent.
- 21:27Speaker 1: Rules drop versus reject subtle difference does.
- 21:30Speaker 2: The order matter hugely? Firewall rules are processed sequentially, usually
- 21:34Speaker 2: first match wins, so a broad allow rule placed too
- 21:37Speaker 2: early might let traffic through that a later, more specific
- 21:41Speaker 2: deny rule was supposed to block. Order is absolutely critical
- 21:44Speaker 2: for effective firewall policy.
- 21:45Speaker 1: Gotcha, get the order wrong, and you've basically unlocked the door.
- 21:48Speaker 2: Pretty much now Beyond the network parameter, Linux has deeper
- 21:53Speaker 2: security mechanisms too, things like SELINICX.
- 21:56Speaker 1: Or a Parmer CELINICX Security Enhance Linux. What does that do?
- 22:00Speaker 2: Think of ce Linux and a Parmer as internal security
- 22:02Speaker 2: guards for your applications. They operate at the kernel level
- 22:06Speaker 2: using mandatory access control MAC. They define very strict profiles
- 22:11Speaker 2: or policies about what system resources, files, network ports, other processes.
- 22:16Speaker 2: Each specific program is allowed to interact with regardless of
- 22:20Speaker 2: the standard user group permissions.
- 22:22Speaker 1: So even if a program gets compromised like a web
- 22:24Speaker 1: server vulnerability, exactly.
- 22:26Speaker 2: Even if an attacker exploits a bug in the web server,
- 22:29Speaker 2: CYLINEX or a parmer can prevent that compromised process from say,
- 22:33Speaker 2: reading sensitive files outside the web root, or connecting to
- 22:36Speaker 2: unexpected network ports, or executing other programs. It contains the damage.
- 22:41Speaker 2: It's a powerful proactive defense layer.
- 22:43Speaker 1: Wow, that sounds complex, but really valuable. What about protecting
- 22:47Speaker 1: the data itself? Encryption?
- 22:49Speaker 2: Yeah, for data confidentiality and integrity. GNU Privacy Guard or
- 22:53Speaker 2: GPG is a standard tool. It implements the open PGP
- 22:57Speaker 2: standard for encrypting and digitally signing files and communications.
- 23:01Speaker 1: How does it work?
- 23:02Speaker 2: Basically, it uses public key cryptography. You generate a key pair,
- 23:06Speaker 2: a private key you keep secret protected by a passphrase,
- 23:09Speaker 2: and a public key you can share freely. Others use
- 23:12Speaker 2: your public key to encrypt messages only you can decrypt
- 23:15Speaker 2: with your private key. You use your private key to
- 23:17Speaker 2: digitally signed files, and others use your public key to
- 23:20Speaker 2: verify that signature, proving the file came from you and
- 23:23Speaker 2: has been tampered.
- 23:23Speaker 1: With GPG for encrypting files and verifying identity. Okay.
- 23:27Speaker 2: And one last simple but effective practice log in banners.
- 23:31Speaker 1: Log In banners like welcome messages sort.
- 23:34Speaker 2: Of by putting text in the etc file message of
- 23:37Speaker 2: the day, you can display important notices or acceptable use
- 23:39Speaker 2: policy reminders to users after they successfully log in. It
- 23:43Speaker 2: doesn't prevent log in, but it's a constant reinforcement of
- 23:46Speaker 2: security policies and system status.
- 23:48Speaker 1: A simple nudge, etcetera mod good for reminders. Okay.
- 23:51Speaker 2: It all adds up layers of security.
- 23:54Speaker 1: Wow. Okay, we've covered a lot of ground here. From
- 23:56Speaker 1: the filesystem map the FA just to navigating with BH,
- 24:01Speaker 1: using tools like OLS and GP, managing permissions with schmood
- 24:04Speaker 1: and attributes with.
- 24:05Speaker 2: Chat, then diving into processes with EAPs and TOP, controlling
- 24:09Speaker 2: them with kill ND and ground scheduling with AT.
- 24:11Speaker 1: And CRON, understanding users and groups with UIDs, GIDS and
- 24:14Speaker 1: the key files like et cetera, pastured and itch and
- 24:17Speaker 1: a shadow, and finally touching on essential security like logging, firewalls, Celinux, GPG,
- 24:23Speaker 1: and even login banners.
- 24:25Speaker 2: It's quite a foundation, it really is, and hopefully you
- 24:29Speaker 2: can see how these pieces connect. Lenox isn't just a
- 24:31Speaker 2: collection of commands. It's a coherent system built on some powerful,
- 24:35Speaker 2: often elegant principles. It's this philosophy of openness and control
- 24:39Speaker 2: that makes it so adaptable.
- 24:41Speaker 1: Adaptable enough to run supercomputers and smart thermostats. It's kind
- 24:45Speaker 1: of amazing, it truly is.
- 24:46Speaker 2: It gives you that fine grain control over your digital environment,
- 24:49Speaker 2: which is rare these days.
- 24:50Speaker 1: So for everyone listening, what does this all mean? Hopefully
- 24:53Speaker 1: you've gained insights that take you beyond just being a
- 24:55Speaker 1: casual user. You've got a better toolkit now for interacting
- 24:58Speaker 1: with this incredibly important operating system. It's definitely a foundation
- 25:02Speaker 1: to build.
- 25:02Speaker 2: On and thinking about that adaptability. Linux is already in spacecraft, routers, phones, servers, desktops,
- 25:09Speaker 2: embedded devices. If we look ahead, say ten years, what
- 25:13Speaker 2: completely unexpected places do you think we'll find Linux powering next?
- 25:16Speaker 2: And maybe more importantly, what new challenges will that bring
- 25:19Speaker 2: from managing and securing it for both admins and maybe
- 25:22Speaker 2: even everyday users interacting with these new Linux powered things.
- 25:25Speaker 2: Something to think about, Keep exploring