I used Windows all my life, and something suddenly wanted to learn a bit about Linux. I would like to deal with all this business from the very, very basics, but I feel that there is a lack of some understanding and theoretical knowledge and ideas. There are a number of questions, the answers to which, it seems to me, may fill in some gaps in my understanding of what Linux is and what it is eaten with. So:

  • Do I understand correctly that there is one unique and unique Linux kernel, on the basis of which all these numerous distributions are developed (Ubuntu, Debian, Mint, etc.), and at the same time it is possible to install this purest kernel, and not some from distributions?
  • Do I understand correctly that the kernel itself is essentially an OS, only without a graphical interface (something like DOS) and the GUI interface can already be installed separately?
  • I heard many times that the kernel at the beginning usually needs to be compiled and then installed. Is it possible to get an already compiled kernel, is it distributed in this form? Is it a good idea to try to compile this very Linux kernel on Windows, and to the extent possible?
  • I heard many times about all sorts of package managers, with the help of which different software is installed on Linux-based systems, and each such OS (Ubuntu, Debian, Mint, etc.) has its own package managers. And what about the clean core? How is something put on him? How is Linux software generally distributed? Only in open source, with subsequent compilation? And such things as installation files, .exe-shniki, etc. - are not usually used?
  • If there is only one PC without an installed OS, how is the Linux kernel installed on it?

For now that's all. Thank you in advance.

  • one
    Linux itself is not an expert, but first I advise you to install Lubuntu. Distributive lightweight, put in two clicks. Try to start with just “play around” with the system, tweak everything for yourself (after all, this is what appeals to Linux!). Check out Unix philosophy, learn how to exit Vim, install and configure Conky. I think you already understood that setting up Linux is an everlasting thrill :) - eanmos
  • 2
    You should not learn Linux from its kernel, you most likely did not study Windows from the kernel ... First, put a distro in the virtual machine that your nearest Linux guru owns. And start learning Linux using such a thing as bash - this will bring you closer to the OS itself than using the GUI. Find in the open spaces of the Internet some book on Linux for beginners and forwards. And the kernel will be occupied sometime next time. - de_frag

4 answers 4

Do I understand correctly that there is one unique and unique Linux kernel, on the basis of which all these numerous distributions are developed (Ubuntu, Debian, Mint, etc.).

Not really. Only one base (initial source code). That is, distributive developers download the source codes of the Linux version they need , make some corrections (patches) into them, set build parameters to include the necessary ones and exclude unnecessary features, and compile the kernel. In other words, distributions differ not only in repositories and application programs, but also in kernel variations.

... and at the same time it is possible to install this purest kernel, and not one of the distributions?

Can. But since the kernel is distributed in source codes, you will have to compile from them your own version, sharpened specifically for your computer and, possibly, needs - the regular configurator make menuconfig is rich in options:

menuconfig

The main window of the graphical configurator for Linux build parameters. Source: Wikipedia

However, obtaining even a minimal operating system is a rather lengthy and multi-step process that requires sufficient knowledge of the principles of Linux operation.

Do I understand correctly that the kernel itself is essentially an OS, only without a graphical interface (something like DOS) and the GUI interface can already be installed separately?

And again, not really. The kernel is just an interlayer between the programs and the hardware. In the case of Linux, there are still drivers included.

To get something similar to DOS, you will additionally need at least GNU Coreutils - a set of programs that define the user environment ( ls , cat , su , etc.), and the bootloader (for example, grub , lilo ) that will load kernel when you turn on the computer.

By the way, precisely because of the symbiosis of the Linux kernel and the GNU Coreutils software package, the operating system is called GNU / Linux.

I heard many times that the kernel at the beginning usually needs to be compiled and then installed. Is it possible to get an already compiled kernel, is it distributed in this form?

Distribution in the source code is a kind of policy of the developers of the kernel, and therefore the compiled kernel can only be torn out from some existing distribution.

Is it a good idea to try to compile this very Linux kernel on Windows, and to the extent possible?

To build Linux, you need a GCC compiler and an LD linker. Theoretically , when building under Cygwin, there should be no problems (if it is to compile the kernel), but there is information about the difficulties with case-sensitive file names that Windows considers to be the same.

I heard many times about all sorts of package managers, with the help of which different software is installed on Linux-based systems, and each such OS (Ubuntu, Debian, Mint, etc.) has its own package managers. And what about the clean core? How is something put on him?

Compiled from source. That is, in the case of a clean kernel, you should always have a compiler at hand.

How is Linux software generally distributed? Only in open source, with subsequent compilation? And such things as installation files, .exe-shniki, etc. - are not usually used?

Building from sources is mandatory only for kernel components, such as drivers. Application programs can also be installed in the form of binary files. Go to the developer site, download any package. Then, knowing that any package is just an archive of one of the common formats, unpack it and scatter the files contained inside to their proper places in the system. Finally, make sure you have all the libraries you need to run this program.

If there is only one PC without an installed OS, how is the Linux kernel installed on it?

To build Linux, you need another copy of Linux. Therefore, you should at least get a live cd of some distribution kit.

    introductory information

    What is Linux and what does it eat?

    linux is a program (library, if you will) that performs the functions of a kernel on a number of operating systems.

    The most well-known operating systems using this program are:

    • gnu / linux
    • android (actually: dalvik / linux , more recently - art / linux )

    The gnu operating system is able to use other programs as a kernel. most famous:

    distribution is an operating system plus a set of user programs and libraries.

    answers to some of the questions

    Do I understand correctly that there is one unique and unique Linux kernel, on the basis of which all these numerous distributions are developed?

    as is clear from the introductory information, not all distributions, which are commonly called “linux distributions”, are based on the version of the gnu operating system that uses the linux program as the kernel.

    Do I understand correctly that the kernel itself is essentially an OS, only without a graphical interface (something like DOS) and the GUI interface can already be installed separately?

    no, the linux program itself is absolutely useless for the user: firstly, it cannot load itself: an additional loader program is needed (the most well-known: gnu / grub , lilo , syslinux ), secondly, even when loaded into memory and running, all it can do is to issue an inscription on the screen: “kernel panic. no init found ”(a joke in which there is only a joke).

    I heard many times that the kernel at the beginning usually needs to be compiled and then installed.

    Absolutely the vast majority of users of the gnu operating system distribution kits do not do this, but simply use the programs already compiled for the distribution.

    I heard many times about all sorts of package managers, with the help of which different software is installed on Linux-based systems, and each such OS (Ubuntu, Debian, Mint, etc.) has its own package managers.

    all three distributions listed by you (never operating systems, please note) use the same package manager - apt .

    The fact that different distributions (and different versions of the same distribution) use different repositories, ie different builds of programs / libraries.

    If there is only one PC without an installed OS, how is the Linux kernel installed on it?

    the linux program itself “install” does not make the slightest sense. need at least another boot loader and the actual operating system. and as the maximum, user programs / libraries are also needed (so that at least something useful can be done).

    for enthusiasts who want to build a system "brick by brick", there is a very well-known guide: linux from scrtatch .

      Yes, there is one unique and unique Linux kernel. But this does not mean that others cannot make changes to it, therefore distributions may have differences. The source code can be obtained from the githab: https://github.com/torvalds/linux and also there are all sorts of manuals.

      You can install a clean kernel, but you get a basic set (something like DOS) and everything else needs to be assembled from source codes, if there are any. If you want to do this, you can turn to Gentoo and try to assemble it, they just have multipage Gentoo Handbook ( here’s one for example ) how to do it.

      Can I build Gentoo for Windows? Most likely, you can provide the compiler with everything you need, but this is another quest. In general, no one bothers to use a virtual machine.

      Package managers access FTP on the Internet and download from there already pre-compiled source code in the package. At the same time, Linux itself provides the ability to add and modify this list. Although due to certain differences in the system, not all of them can correctly stand under a different system, even within different versions of the same distribution. Well, on clean I think it is understandable - compile manually.

      On the fifth question, again, there is a Gentoo Handbook from which you can learn this knowledge.

      PS As a rule, no one learns Linux from the kernel if you are not an OS developer, and the study goes through examining the terminal, bash, setting up users, studying directories, embedded tools, trying to set up a network, raising a server with a simple website and other administration. And if you are an OS developer, then again no one is involved in this from the very beginning, since there are books by Tonenbaum (one of which inspired Linus to write his OS about Minix).

        Everything said earlier is correct, I would like to add in trifles:

        1. If you want to get to know linux, then the craziest way is to deal with building and installing the kernel. Just take any live image of any Linux distribution (on a CD or on a flash drive - there are plenty of them in the Internet) - look, click the buttons.
        2. If you are interested - install this distribution on your computer. As a rule, when downloading all Live images pops up a menu in which there is an item "Install". Just select this item and there will be a quite accurate installation of this distribution on your computer. If there is a Windows driver on the computer, then nothing will happen to it. The installer will ask you how much space on HD you allocate for Linux. It will configure the bootloader with the OS selection menu and install the hottest applications. You will receive a READY-ready system.
        3. A very important point that fundamentally distinguishes Linux from Windows is the presence of repositories. You don’t need to search the Internet, search for the program you are interested in, deal with the installation process, check for the required libraries, check for updates, etc. ... The system installer will do it for you. In reality, there are only two types of installers - for DEB packages and RPM packages. What you choose during installation (type of distribution) with that and will deal in the future. Believe me - this is a huge advantage compared to Windows!
        • Windows also has similar repositories. For example choco - Vladimir Gamalyan