Linux 只是一个内核：这是什么意思？
Linux 内核
![](/data/attachment/album/202303/04/085224mw1qoq5kaukqzxmz.jpg)



> 
> 这是一个困扰 Linux 用户的常见问题。这也是考试和面试中经常问到的一个问题。下面是你需要了解的所有内容。
> 
> 
> 



*开源朗读者 | 徐斯佳*


你可能在网络上的各种论坛以及讨论区听过这句话：



> 
> Linux 只是一个内核。
> 
> 
> 


这让你感到好奇。它是个内核？还是个操作系统？两者之间有什么区别？


我将在本文中回答这些问题。


### Linux 是操作系统还是内核？


好吧，**从技术上讲，Linux 只是一个内核**，而不是一个操作系统。但是，术语 “Linux” 通常是指一个完整的操作系统，它包括一个 <ruby> 交互界面 <rt>  Shell </rt></ruby>（例如：bash）和命令行和/或 GUI 工具来控制系统。这个完整的操作系统的正确叫法是 “Linux 发行版”。流行的 Linux 发行版有 Ubuntu、Red Hat 和 Debian。


早在 1991 年，Linus Torvalds 创建的只是一个内核。直到今天，他也在为 Linux 内核工作。他不再编写代码，而是监督哪些代码进入内核。


### 内核？什么东西？


内核是每个操作系统的中心。不仅仅是 Linux，Windows 和 macOS 也有内核。


将内核想象成操作系统的心脏。没有心脏，你就无法生存。没有内核，操作系统就无法存在。


但是，就像心脏需要一个身体来生存一样，内核需要其他人们可以在计算机上使用的程序和工具来构成一个完整的操作系统。


这是一个操作系统的典型架构：


![](/data/attachment/album/202303/04/090011izoaowsuro2grtjq.jpg)


在中心的内核与硬件交互。在它之上是与内核交互的 <ruby> 交互界面 <rt>  Shell </rt></ruby>。然后你有应用程序、命令行和图形界面，为你提供使用系统的各种方式。


### 内核是引擎，操作系统是汽车


一个更好的类比是将内核想象成汽车的引擎，而操作系统则是汽车。


你不可能驾驶一个引擎，但是如果没有引擎，你也不能驾驶一辆汽车。你需要轮胎、转向机和其他组件才能将其变成一辆可以驾驶的汽车。


相似地，你不能直接使用内核。你需要 <ruby> 交互界面 <rt>  Shell </rt></ruby>，其他工具和组件才能使用操作系统。


![](/data/attachment/album/202303/04/090017gsz18ivtw7sz1a7k.jpg)


### Linux 对比 GNU/Linux


在类似的地方，你也会看到例如 “Linux 只是一个内核，[你所说的 Linux 实际上是 GNU/Linux](https://itsfoss.com/gnu-linux-copypasta/)” 的陈述。


在 Linus Torvalds 在 1991 年创建 Linux 之前，Richard Stallman 就创建了<ruby> 自由软件运动 <rt>  Free Software movement </rt></ruby>和 GNU 项目。GNU 项目包括对流行的 UNIX 工具和命令的重新实现，例如 `ls`、`grep`、`sed` 等。


通常，你的 Linux 发行版会在 Linux 内核之上包含所有这些 GNU 工具。


这就是为什么纯粹主义者坚持称之为 GNU/Linux，以便人们不要忘记 GNU 对 Linux 成功的贡献和重要性。


### 最后……


**所以，如果你在面试或者考试中被问到这个问题，回答 “Linux 是一个内核，而不是一个操作系统”。这是你的老师或面试官在大多数情况下想要的答案。**


但是更深入一点，理解内核和操作系统之间的区别。


如果有人说：“我使用 Linux”，你就会明白这个人是指 Linux 发行版，而不仅仅是内核。诚然，没有必要用 “Linux 只是一个内核，而不是一个操作系统” 来纠正别人。




---


via: <https://itsfoss.com/linux-kernel-os/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lkxed](https://github.com/lkxed/) 译者：[Cubik65536](https://github.com/Cubik65536) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

You may have heard this in a number of forums and discussions on the internet.

Linux is just a kernel

And that made you curious. Is it a kernel? Is it an operating system? What's the difference between the two?

I'll answer those questions in this quick explainer.

## Is Linux an OS or kernel?

Well, **technically, Linux is just a kernel**, not an operating system. However, the term *Linux* is often referred to a complete operating system that includes a shell (like bash) and command line and/or GUI tools to control the system. The technically correct term for this complete operating system is Linux distribution or simply Linux distro. Examples of popular Linux distributions include Ubuntu, Red Hat, and Debian.

Back in 1991, what Linus Torvalds created was the kernel only. Even today, he works on the Linux kernel. He doesn't code anymore but supervises which code goes into the kernel.

## Kernel, what?

The kernel is at the center of every operating system. It's not just a Linux thing. Windows and macOS have kernels too.

Think of the kernel as the heart of an operating system. You cannot live without your heart. Your operating system cannot exist without a kernel.

However, just like a heart needs a body to live in, the kernel needs other programs and tools to make a complete operating system that people can use on their computers.

Here's the typical structure of an operating system:

![Typical operating system structure](https://itsfoss.com/content/images/2023/03/os-structure-kernel.png)

The kernel is at the core interacting with the hardware. On top of that lies the shell that interacts with the kernel. And then you have applications, command line and graphical, to give you various ways of using the system.

## Kernel is the engine, OS is the car

A better analogy is to think of the kernel as the engine of a car and the operating system as the car.

You cannot drive an engine but you can also not drive a car without the engine. You need to have tires, steering, and other components to turn it into a car you can drive.

Similarly, you cannot use the kernel directly. You need shell and then other tools and components to use the operating system.

![Kernel is like engine and operating system is like a car](https://itsfoss.com/content/images/2023/03/kernel-engine-analogy.png)

I have written an in-depth article with this analogy. I am not going to repeat it all. If you liked the analogy, do read the article 👇

[What is Linux? Why There are 100’s of Linux OS?Cannot figure out what is Linux and why there are so many of Linux? This analogy explains things in a simpler manner.](https://itsfoss.com/what-is-linux/)![](https://itsfoss.com/content/images/wordpress/2020/03/too-many-linux-choices.png)


![](https://itsfoss.com/content/images/wordpress/2020/03/too-many-linux-choices.png)

## Linux vs GNU/Linux

On a similar line, you'll also come across statements like 'Linux is just a kernel, [what you are referring to as Linux is actually GNU Linux](https://itsfoss.com/gnu-linux-copypasta/)".

Even before Linus Torvalds created Linux in 1991, Richard Stallman created the Free Software movement and the GNU project. The GNU project encompasses the reimplementation of popular UNIX tools and commands like ls, grep, sed, etc.

Typically, your Linux distribution comes with all these GNU tools on top of the Linux kernel.

This is why purists insist on calling it GNU Linux so that people don't forget the contribution and importance of GNU in the success of Linux.

## In the end...

*So, if you are asked this question in viva or interview, reply with 'Linux is a kernel, not an operating system'. Mostly your teacher or interviewer is looking for that answer.*

But deep down, understand the difference between the kernel and the operating system.

If someone says, "I use Linux", you understand that the person is referring to a Linux distribution, not just the kernel. And sincerely, there is no need to correct someone with 'Linux is just a kernel, not an operating system'.