Linux Basic Knowledge Collation (i)

Source: Internet
Author: User

Take advantage of these days to find a job, some knowledge simple collation, the formation of logic, internal absorption, and really can be easily written, ready to use, really become the bones of things rather than will "use", and will not "write"! Think about it, it is really a command, although simple, but sometimes really let you immediately go to the execution of the time, still will appear stuttering. Purely personal point of view, if there are some inappropriate places or the obvious wrong place to hope that you correct, some things of course, if there is a copyright issue, please contact me promptly, I will immediately delete.

People with a certain understanding of Linux should probably know that although we usually refer to the Linux kernel and GNU Toolchain as a combination of Linux, some Linux purists refer to it as the Gnu/linux system to honor the GNU Organization's contribution to this. Of course, I am also more inclined to the latter gnu/linux. Because this name completely and accurately points out the composition of Linux: The Linux kernel +gnu tool component. Others say there are graphical desktop environments and applications, but I still insist that the first two are the most central, and that they should provide a good human-computer interaction experience, so here is the simple Linux kernel and GNU tool components.

The core of the Linux system is the kernel. The kernel controls all the hardware and software on the computer system: allocates the hardware if necessary, and executes the software when needed. The kernel is responsible for the following four key features:

    • System memory Management

    • Software program Management

    • Hardware Device Management

    • File System Management

  1. System memory Management

    One of the basic functions of the operating system kernel is memory management. The kernel manages not only the available physical memory on the server, but also the creation and management of virtual memory (that is, memory that does not actually exist).

    You can observe the current state of virtual memory on a Linux system through the/proc/meminfo file. 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/FA/wKioL1WOLLuDSqfWAAEo0nS9hDY878.jpg "title=" oiz}[ Bs%db[6]p[8zyyyznu.png "alt=" Wkiol1wolludsqfwaaeo0ns9hdy878.jpg "/>

    Memtotal: The line indicates that the Linux server has 500M of memory (virtual machine), which indicates that there is about 9 m of free space remaining (Memfree). is also drunk, make up the problem on the line, the output indicates that the system has about 2GB of swap space (swaptotal).

  2. Software program Management

    The Linux operating system calls the running program a process. The process can be run in the foreground, the output will be displayed on the screen, or it can be run in the background and hidden behind the scenes. The kernel controls how the Linux system manages all processes running on the system.

    The kernel creates the first process (the INIT process) to start all other processes on the system. When the kernel starts, he loads the init process into virtual memory. When the kernel starts any other process, it allocates a proprietary area to the new process in virtual memory to store the data and code used to process the changes.

    Some Linux system distributions consist of a table that manages the process to be started automatically when the system is powered on. On Linux systems, this table is typically located in a dedicated file/etc/inittab.

  3. Hardware Device Management

    Another function of the kernel is to manage hardware devices. Any device that needs to communicate with the Linux system needs to include its driver code in the kernel (driver codes). The driver code acts as an intermediary between the application and the hardware device, allowing the kernel to exchange data with the device. There are two ways to insert device driver code in the Linux kernel:

    A, the device driver code compiled into the kernel

    b, the device driver module can be inserted into the kernel

    A Linux system treats a hardware device as a special file, called a device file. There are three different types of device files:

    • Character-type device files

    • Block device files

    • Network device files

Linux creates a special file for each device file on the system, called a "node." All communication with the device is done through the device node. Each node has a unique numeric pair that is used by the Linux kernel to identify him. Numeric pairs include a master device number and a number of secondary devices. Similar devices are classified under the same main device number. The secondary device number is used to identify a particular device under the same main device number.


File System Management Linux supports a variety of file systems, and any hard disk that is accessed by a Linux server must be formatted as one of the file systems. The Linux kernel uses a virtual file system (VFS) as an interface for interacting with each file system. The Linux kernel provides a standard interface for communicating with any type of file system, and when each file system is mounted and used, the VFS will slow down the information in memory.


GNU Tool Chain

    1. Core GNU tool Chain

The GNU coreutils package consists of 3 parts:

    • Tools for working with text

    • Tools for manipulating text

    • Tools for managing Processes

Each of the three main sets of tools contains tools that are critical to Linux system administrators and programmers.

2. Shell

simple understanding, is the system with the computer hardware to use intermediate media, it is only a tool of the system. in fact, inShellThere's a layer of stuff between the computer hardware and that's the system kernel.. For example, if the computer hardware is compared to a human body, and the system kernel is the human brain, as forShell, it seems more appropriate to compare it to the human senses.. back to the computer, the user is not directly facing the computer hardware butShell, the user tells the instructionShell, and thenShellagain to the system kernel, and then the kernel to control the computer hardware to perform various operations.

I'm in touch with LinuxRelease version (Redhat/centos) system is installed by defaultShellcalledBash, i.e.Bourne Again Shell, it isSH(Bourne Shell) Enhanced version of. Bourn Shellis one of the first to line upShell, the founder calledSteven Bourne, in honor of him, so calledBourn Shell, the prosecutionSh.


Linux Basic Knowledge Collation (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.