CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
  • Week 1
    • 1.Operating Systems and the Kernel: What Linux Does
    • 2.The Birth of Linux: From Unix to Linus
    • 3.Free Software and Open Source: What a License Decides
    • 4.Distributions: The Unit That Bundles the Kernel and Tools for Sale
    • 5.Week 1 Review: The Identity Behind the Name Linux
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
  • Week 11
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← Linux Master 2/Week 1/Day 1

Based on the Linux Master 2 exam syllabus·Report an error

Linux Master 2· AssociateWeek 1 · Day 1~23 min read

Day 1 - Operating Systems and the Kernel: What Linux Does

📌 Key Takeaways

  • The kernel is the core that handles hardware directly, and the shell is the interpreter that passes the user's commands to the kernel.
  • "Linux" originally names the kernel. The complete operating system we use is the kernel plus a collection of GNU tools.
  • The kernel's five big jobs: managing processes, memory, the file system, devices, and the network.
  • The Linux kernel has a monolithic structure, and it can attach and detach features as modules when needed.
  • Check the kernel version with uname -r; under an old rule, an even second number meant a stable version.

A Computer Has Four Layers

The fastest way to understand Linux is to draw the layered structure.

┌─────────────────────────────────┐
│  Applications                    │  vi, web browser, compiler
├─────────────────────────────────┤
│  Shell                           │  bash, sh, csh — command interpreter
├─────────────────────────────────┤
│  Kernel                          │  Linux itself
├─────────────────────────────────┤
│  Hardware                        │  CPU, memory, disk, network card
└─────────────────────────────────┘
  • An upper layer cannot touch the layer below it directly. If an application wants to write to disk, it has to ask the kernel.
  • This request is called a system call.
  • The reason for this barrier is stability. If one program goes wrong, the whole system doesn't collapse.

Questions asking for "the difference between the kernel and the shell" come up repeatedly in the exam. Just be sure of this: the shell only interprets and forwards commands; it does not handle hardware directly.

The Five Things the Kernel Actually Does

JobWhat it doesExamples
Process managementDecides which program gets the CPU and whenScheduling, process creation and termination
Memory managementHands out memory to each program and reclaims itVirtual memory, swap
File systemPresents the 0s and 1s on disk as "files and directories"Mounting ext4, xfs
Device managementProvides drivers that operate the hardwareKeyboard, printer, graphics card
NetworkHandles the rules for sending and receiving packetsTCP/IP stack
  • All five share one thing in common: "making resources shareable."
  • One-sentence definition of an operating system: "software that manages hardware resources and provides an interface to users."

The Scope of the Name "Linux"

This is where beginners get confused the most.

  • Linux in the narrow sense = the kernel created by Linus Torvalds.
  • Linux in the broad sense = the operating system (= a distribution) that bundles the kernel, GNU tools, and assorted software.

That is why the free software camp argues we should call it "GNU/Linux." Commands we use every day like ls, cp, and bash were all made by the GNU project, not by the Linux kernel.

Kernel Architecture: Monolithic vs. Microkernel

CategoryMonolithic kernelMicrokernel
StructureMost functions live inside the kernelOnly minimal functions in the kernel, the rest outside
SpeedFast (calls finish inside the kernel)Relatively slow (communication overhead)
StabilityAn error in one part can affect the wholeProblem parts can be isolated
SizeLargeSmall
ExamplesLinux, UnixMINIX, Mach
  • Linux is monolithic. This single line is an exam point.
  • It is not purely monolithic, though. With loadable kernel modules (LKM) it can attach and detach features when needed, borrowing some of the microkernel's advantages.
  • That's why it is sometimes called a "modular monolithic kernel."

Reading the Kernel Version

$ uname -r
5.15.0-88-generic
│ │  │
│ │  └── Patch level
│ └───── Minor version within the major version
└─────── Major version
  • In the old days (before 2.6), the rule was: an even minor version meant a stable release, an odd one meant a development release.
    • 2.4 → stable / 2.5 → development
  • This rule disappeared after 2.6. Today, even/odd has nothing to do with stability.
  • The exam still sometimes asks about the old rule, so it's worth remembering the sentence "even = stable" itself.

How Kernels Are Classified Today

After the even/odd rule went away, the official kernel site (kernel.org) classifies versions by nature.

CategoryMeaning
mainlineThe main development line, maintained directly by Linus Torvalds. New features land here
stableA stable version that takes a release from mainline and adds only bug fixes
longtermA long-term support version that keeps getting fixes for several years. Distributions mostly pick this
  • The -88-generic part after 5.15.0 is a label added by the distribution. Even for the same 5.15 kernel, the trailing part differs by distribution.
  • The kernel file itself sits under /boot with a name like vmlinuz-version.

User Mode and Kernel Mode: The Door a System Call Passes Through

The rule that "an upper layer cannot touch the layer below it directly" is not a mere convention; it is a distinction enforced by the CPU.

CategoryUser modeKernel mode
What runs hereApplications, the shell, ordinary commandsThe kernel, device drivers (modules)
Direct hardware accessNot allowedAllowed
Memory it can seeOnly its own process areaEverything
If an error occursOnly that program diesThe whole system can halt (kernel panic)

Follow what happens when the single line cat memo.txt runs, and the layered structure shows up exactly as drawn.

 Shell (bash)  Interprets "cat memo.txt" and launches the cat program
    │
 cat           User mode — asks to "open, read, and write to the screen"
    │            open()      read()        write()      ← system calls
    ▼
 Kernel        Kernel mode — finds the location in the file system and calls the disk driver
    │
 Disk          The actual data is read
  • The shell only goes as far as interpreting the command and launching the program. Reading the disk is done entirely by the kernel, start to finish.
  • The shell itself is also an ordinary program running in user mode. That's why you can swap bash for zsh and the kernel stays the same.

⚠️ Trap: "The shell controls the hardware" and "the kernel interprets commands" — both are wrong answer choices with the roles swapped. It is fixed: interpretation is the shell, control is the kernel.

Features of Linux

This is the list that feeds questions in the "Understanding Linux" area asking you to pick "which is NOT a feature of Linux."

FeatureMeaning
Multi-userSeveral people can log in and use one system at the same time
Multi-taskingRuns several programs at once. CPU time is sliced finely and handed out in turn
Excellent portabilityMost of the kernel is written in C, so it moves to PCs, servers, smartphones, even embedded devices
Virtual memoryWhen memory runs short, it borrows the disk's swap area and uses it like memory
Hierarchical file systemEvery file sits in a tree that branches out from a single / (root)
Shared librariesMultiple programs share the same library code, saving memory and disk
Virtual consolesSwitch between several login screens on one monitor (Ctrl+Alt+F1~F6)
Strong networkingThe kernel supports TCP/IP out of the box. That's why it is so widely used as a server
Open softwareThe kernel source is released under the GPL, so anyone can modify and use it
  • Multi-user and multi-tasking are different things. The former means "many people," the latter "many programs."
  • Weaknesses are asked about too — because it is open software, official guarantees of problem resolution are hard to get (paid support for commercial distributions is the exception), and some commercial programs and hardware don't support Linux.

Seeing Kernel Modules with Your Own Eyes

The statement "modules are attached and detached" can be confirmed right away with a few commands.

CommandWhat it does
lsmodLists the modules currently loaded in the kernel
modinfo module_nameShows a module's description, file location, and dependencies
modprobe module_nameLoads a module. It automatically loads any modules it depends on too
insmod file_pathLoads just one module file. It does not handle dependencies
rmmod module_nameUnloads a module
$ lsmod | head -4
Module                  Size  Used by
isofs                  49152  1
xfs                  1589248  2
e1000                 151552  0
  • Module files live under /lib/modules/kernel_version/ and have the extension .ko (kernel object).
  • If Used by is not 0, someone is using it, so it can't be unloaded.

Try It Yourself

uname -a          # Everything: kernel name, version, architecture
uname -r          # Kernel version only
cat /proc/version # Information the kernel reports about itself
echo $SHELL       # The shell you are using now
$ uname -a
Linux ubuntu 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

With uname, each option corresponds to one piece of the output. -a simply strings them all together.

OptionOutputIn the example above
-sKernel nameLinux
-nHostname (network node name)ubuntu
-rKernel release (version)5.15.0-88-generic
-vKernel build info (build number, date)#98-Ubuntu SMP …
-mHardware architecturex86_64
-oOperating system nameGNU/Linux
  • The GNU/Linux at the very end stands out. The kernel name (-s) is Linux and the operating system name (-o) is GNU/Linux — the "narrow sense / broad sense" distinction we saw earlier is split right there in the command output.
  • uname only tells you about the kernel. To see the distribution name and version, use cat /etc/os-release.

Tomorrow we follow where this kernel came from — the lineage from Unix to Linux.

📖 Glossary

  • Kernel : The core of the operating system that controls hardware directly. The original meaning of "Linux."
  • Shell : A program that interprets the commands the user types and passes them to the kernel. bash is the best-known example.
  • System Call : The official window through which an application asks the kernel to do work.
  • Monolithic kernel : A structure where most functions live inside the kernel. Linux belongs here.
  • Microkernel : A structure that keeps only minimal functions in the kernel and moves the rest outside. MINIX is the classic example.
  • Kernel module (LKM) : A piece of kernel functionality that can be attached and detached at run time. Device drivers mostly take this form.
  • GNU/Linux : The precise name for the operating system that combines the Linux kernel and GNU tools.
  • Virtual memory : A kernel memory-management technique that makes it look as if you are using more space than the actual memory.
  • Kernel mode / user mode : The execution state that can touch hardware directly, and the one that can't. Applications run in user mode.
  • Virtual console : A feature for switching between several login screens on a single monitor.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which of the following correctly describes the structure of the Linux kernel?

Question 2

Which of the following best describes the shell?

Question 3

Which of the following is LEAST related to the kernel's main functions?

Question 4

What is the official channel called that prevents applications from accessing hardware directly and is used to request work from the kernel?

Question 5

Which of the following correctly describes the name "Linux"?

Next The Birth of Linux: From Unix to LinusWeek 1 · Day 2

Official references

  • Linux Master 2 official exam syllabus(opens in a new tab)

On this page

  • Key Takeaways
  • A Computer Has Four Layers
  • The Five Things the Kernel Actually Does
  • The Scope of the Name "Linux"
  • Kernel Architecture: Monolithic vs. Microkernel
  • Reading the Kernel Version
  • How Kernels Are Classified Today
  • User Mode and Kernel Mode: The Door a System Call Passes Through
  • Features of Linux
  • Seeing Kernel Modules with Your Own Eyes
  • Try It Yourself
  • Glossary
  • Practice Questions