开发者

What's the relationship between a Linux OS and a kernel?

开发者 https://www.devze.com 2023-01-10 08:09 出处:网络
I\'ve been using Linux for several years, but never stepped beyond installing from a CD/DVD. If the app manager didn\'t have what I was looking for in the software, then I was a lost cause.

I've been using Linux for several years, but never stepped beyond installing from a CD/DVD. If the app manager didn't have what I was looking for in the software, then I was a lost cause.

But right now I'm trying to get a grip around what "Linux" is.

The first word that pops into my head is "kernel". After reading on Wikipedia, I understand that a kernel is software running to give other software (OS + apps) access to hardware (CPU, RAM+++). It also handles memory, but isn't that what the OS is supposed to do (what I remember from OS class)?

Is the Linux distro just a packed list of software?

Take my favorite distro: Fedora. It's now in version 14 and ships with kernel 2.6.35.

Does the kernel come from s开发者_StackOverflow中文版omewhere central and is the core of every Linux distro? If this is true, then is the Linux distro just a way of making the computer with the kernel more user-friendly to use? In that way, the distro+kernel is the OS because the one without the other is not usable (maybe pure kernel, but who sits on that?).


Pretty much correct. To me, "linux" is just the kernel. But it is pretty common to refer to entire distributions as linux. That is what annoys RMS so much. He maintains it should be called GNU/Linux, as he sees distributions as the linux kernel plus the additional software from the GNU project. This makes sense too but I never use the term GNU/Linux. I am either talking about the kernel linux, or "linux distributions", or a specific distribution.

So yes. A distribution is just the kernel (which may include distribution specific patches) plus all the extra programs that make it usable.

The kernel is a central project, and is nominally the same in each distro, but most distros customize it a bit.

And the extra software doesn't just make the kernel more user friendly, it makes it usable at all. A kernel is just interrupt handlers, device drivers, and system calls. It basically virtualizes the hardware and provides a standard environment for programs to work on.

As far as the phrase "operating system" goes, it can be confusing. Some people may say the kernel IS the operating system, and everything else is either a utility or an application or something else. Other people may say the kernel plus some other packages make up the operating system, but most of the software is not part of the operating system. Others may say all the software in the distro forms part of the operating system.


Linux is the kernel. That's what Linus wrote and that's what the kernel developers continue to work on today. It controls the hardware.

An operating system is something that includes a kernel plus quite a few lower-level "applications" to allow you as a user to do useful stuff with your computer (think file manager, control panel and so on).

A distro (distribution) is an operating system packaged with an absolute massive amount of higher-level applications(a) like DVD authoring tools, web browsers, office suites and so on ad-near-infinitum(b).

Now there are grey areas between kernel/OS and even OS/distro but I think that's a fair starting point for understanding how it hangs together.


(a) Even Windows does this to some extent, with the inclusion of Wordpad, Calculator and Paint, though not to the insanely prolific level that Linux distros extend to - do we really need 472 different file managers? Choice is good, yes, but only up to a point :-)


(b) Yes, I'm aware that "ad-near-infinitum" makes no sense since any finite amount subtracted from the infinite is still infinite. But, if you want mathematical accuracy, you should probably be over at https://math.stackexchange.com :-)


OS is just kernel and Shell which work hand in hand.

Distro is combination of customized shell(s) working on a kernel.This means,for example-Kali,Ubuntu,fedora,Mint etc are different distros which work on Linux kernel.

Shell acts as an interface between the user and the kernel.Shell can be command line interface or Graphic user interface.Bash,sh,Windows GUI are some shells.

Kernel is hub of operating system.It allocates time and memory to programs and handles the filestore etc.

To further explain shell and Kernel suppose you type cd . The shell searches the filestore for the file containing the program cd, and then requests the kernel, through system calls, to execute the program cd on myfile.

To take a simple example- Windows GUI is a Shell,Windows OS a disribution by Microsoft.

Similary,Ubuntu OS or fedora OS etc a distro working on various shell using Linux kernel.

Shell or a distro does not make Kernel more user friendly to use but it makes it usable for user.

So now,simply you can say Linux is a kernel. Linux + shell(Bash,Gnome etc) is a Linux distro say Ubuntu,Mint,Kali etc and each of them is a OS.


"kernel" and "shell" are the original terms, as in let's say "core" and "shell". "Shell" is the command interpreter. "Distro" is a term that means a customized shell(s) + specific programs included in that distribution. One distribution might several shells though. From a user perspective this is close to the concept of human language. Is the language that you have to talk to the terminal which will talk to shell. Shell will read it and look for a file within the filestore (still inside the shell/ distro). Once the file (executable) is found, shell sends this to the kernel which does the job (process). Think of a car which will have the same basically unmodified engine over many years but will change its frame/ body. I think I need to stop here...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号