Linux Basic Article __linux

Source: Internet
Author: User

One. Concept of a full installation kit (distribution)
Linux is actually a kernel (system call interface, thread, memory, file, device), a complete operating system should be composed of some software kits and Knernel,
As a result, some companies load needed packages into Linux core programs and then release them as CD-ROMs for a small amount of service charge.


Two. File type
Results at Ls-l Temp
-RWXRWXRWX--. baxh.txt
drwxrwxrwx--Vares
D is a file type representation is a directory. Indicates that the file is hidden
(1) Normal file ls-l The first property has [-] started
Regular files include text files and binary files
(2) The first property starts at [d] when the directory (director) Ls-l
(3) The first property starts at [l] when the linked file ls-l. Shortcuts like windows
(4) The first property of a device file (device) block file, such as/mnt/hda1 Ls-l, begins with [b]. Character device keyboard, mouse. Ls-l The first property starts at [c]


Three. Linux Directory
/bin store MV LS RM, and other common file execution places like Use/bin, dedicated to the general user's use of the execution program
/boot places the core of Linux and initiates associated files, such as Grub
/etc The files, accounts, passwords, system settings, and service items that need to be started when the system is started
/sbin placement System management commonly used programs, Fdisk,mount and/bin the difference is that the directory of the program is usually root and other system administrator to use the program
Where the/tmp user holds temporary files, the default installation path for the software is in/tmp
/ usr holds system information, somewhat like program file under Windows


Four. Linux partitions
The MBR (Master boot Record) (<521m) master boot records contain a series of parameters and a boot program for the hard disk. 0th track in Disk partitioning
The main role of the hard disk boot program on it is to check the partition table (note: The partition table records all the partitions ' information) is correct and the system hardware completes the Self-Test
Later, boot the operating system on the partition with the activation flag and give control to the startup program. The MBR is generated by a partitioning program (such as Fdisk.com),
It does not rely on any operating system, and the hard drive boot program can also be changed to enable multiple systems coexistence. Because the size of the MBR is limited, it can only be designed into 4
Split records, 4p or 3p+e (up to only one Extended extended partition) The extended partition cannot be directly used as a logical partition (up to 16 logical partitions).
Logical partitions can also be split into multiple partitions. So if you want to have five partitions must be designed as 3P+1E, and then the expansion of the partition to be planned again,

Figure: 3P+1E partition Table allocation


Figure: 1P+1E partition Table allocation

The role of swap space can be simply described as: <128 when the physical memory of the system is not enough, you need to release some space in physical memory,
For use by the currently running program. The space that is freed may come from programs that do not operate for a long time,
These freed spaces are temporarily saved to the swap space, and the saved data is recovered from swap to memory when those programs are running.
In this way, the system always swaps when there is not enough physical memory.
/: Root partitions: Storing system files
/boot: Storage kernel (80--500m)
Swap: Swap partition, no mount point we can't live. Write file, only system (>=2x memory capacity), act as virtual memory
/usr: storing applications (large capacity)
/home: Store User Configuration information (number of users)
/temp: Storing temporary files (small capacity)


Five, Linux boot process

(1), turn on the power, automatic BIOS in a section of the program, this program tells you in which way to start the computer (U disk). Hard disk. )。

(2), from the selected equipment (such as U disk) to read the data in the first byte, this 521 byte is the MBR program. The MBR will tell you which partition to load the boot program (boot loader).

(3), boot loader load kernel kernel, it is the core of the computer, mainly used to manage the hardware resources of the computer.

(4), kernel first detects the computer hardware through the driver, then initiates the init process.

(5), Init will execute a series of footsteps procedures. Set computer name, time zone, detect file system, mount hard disk, empty temporary files, set up network, and so on.

When these initialization steps are completed, the login dialog box pops up.

Boot->bios->mbr->boot loader->kerner->check hardware->init process->login


Vi. Linux Architecture


Kernel (Kernel): is a computer program, direct management of hardware, including CPU, memory, hard disk interface, network interface and so on.
System call: In order to use the Kernel,kernel kernel to be made into system calls (systems Call) Linux system calls are more than 200, system calls are the operating system's smallest functional unit.
Library Functions (LIB): Because the functionality provided by the system call is very basic and cumbersome to use, the library function is used to encapsulate system calls into some common functions.
Shell: Command interpreter, the shell acts as a user interface, and when a user wants to run certain applications, the shell enters commands to run the program. The shell then uses system tuning to implement specific functions with the command kernel.



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.