Linux notes: some basic concepts and definitions

Source: Internet
Author: User
Linux notes: some basic concepts and definitions-general Linux technology-Linux technology and application information. For more information, see the following. In this field, the most basic task is to familiarize yourself with it in one week. What each directory is, and what each command is. This is also the first level for beginners! First, sort out some summary as follows. When you get familiar with windows, you may feel that using windwos is very troublesome and restricted. In addition, most of the software in linux is free of charge, in terms of economy, it will save a lot of money. Of course, if you are in mainland China, using free software is not an advantage. However, when the source code is open, you can control your system by yourself, which is a big gain in security.

Note that the command is case sensitive!

Part 1: linux directory

The following are some of the basic introductions in each of the following books. You need to first use the terminal and ls commands. It is better for each user to view them. This is also the first part of familiarity. In fact, this part of content can be described at most. But it is also the most difficult to tell, and the general introduction is the easiest.

First, enter cd/bin in the terminal, and then enter the ls command, which contains some binary file programs and tools. Is the vast majority of running commands.
In the boot directory, it is necessary for the system to start, such as image and code.
In the dev directory, there are some system devices. In linux, these are regarded as files.
The location where the configuration file of the etc system is stored. All the configuration files of the system are placed below this
Home: the location for normal users. It is empty after installation and increases as the number of users increases.
Initrd temporary directory, which is used during initialization and boot
Location of lib dynamic link stock placement
The fragment file found during lost + found self-check. If a file is lost, it may be retrieved from it.
Misc is basically useless.
Mnt mounted on external devices, optical drive
Opt third-party software installation
The proc virtual file system reflects the process information and does not occupy hard disk space.
Root directory
Sbin superuser management tool systems are indispensable
Tmp temporary files are globally available
Public information of all users

Part 2: Network System Model

OSI (International Standards Organizations ISO), also known as the "iso osi (Open System Interconnection) Reference Model", is a Model of a general network System. It's just a framework and a standard, which is not strictly designed at present. In fact, the network we are using is basically produced according to this standard. At the same time, this model is also hierarchical, and the division of labor at each layer is also different.

Communication Subnet layer:
For example, the first layer is also the foundation of everything, that is, the physical layer and electrical aspects. It is also an excuse for hardware. The second layer data link (data link layer) is responsible for communication channel transmission. The third-layer network is responsible for data transmission. The process of transferring data from this host to that host. The first three layers are the foundation of the information world. They are also the Communication Subnet layer and the field of electrical engineers. At the same time, they also provide communication services for the above layer. The sum of the above layers is called the resource subnet layer. This is the scope of care for software engineers.

Resource subnet layer:
The transport Layer on the fourth layer is a connected layer. Its main function is to transmit information from the previous layer to the Session Layer of another host. The session Layer provides communication and information exchange between the two hosts. The presentation layer, as its name implies, is used to make the information clear. For example, information compression and code conversion are the process of turning unintelligible information into acceptable information. The next application layer is frequently used. Such as email, file transmission, and website browsing.

Part 3: basic structure of UNIX/Linux

Linux can be seen as a layer-by-layer concentric circle. The most intermediate part is hardware. Outside the hardware is the system kernel! There are various programs outside the system kernel! The outermost layer provides services for gcc and applications from the inside out. The biggest feature is isolation! Programs outside the kernel are isolated from hardware! The most intermediate part of the kernel serves as an intermediate link for providing interfaces between programs and hardware! Therefore, with this feature, programs and hardware are isolated and can be easily transplanted. It can run on unix systems of different hardware. The program with the outer layer communicates with the kernel by referencing system calls. At this point, the system call is an excuse between the outer program and the kernel! Used for information exchange between two layers. Therefore, in general, all levels of linux are clear. In a more macro view, there are three layers: User Programs, kernels, and hardware. In fact, from reality to the social structure, it is generally not clear that each part has a lower dependence, but is it more stable?

Part 3: Process

The reason why the operating system has moved from dos to windows is the discovery of the Process concept. You can execute multiple tasks in parallel. So that the hardware of the machine can play a more role, but the complexity of the algorithm is followed. Therefore, if you can understand the process, you can enter a new level horizontally. The first thing you need to understand is that the program is not the same as the process! A program is an executable file, while a process is an instance in the execution process! The process is dynamic, while the program is static, and multiple processes can execute the same program concurrently. Processes are also the most important part in linux!

To understand the importance of tree structures, we can learn more about the process. In one process, you can also start another process. This superposition can also become a tree distribution. Init is the ancestor of all user processes and the source!

In linux, there are also system calls for process control. The most basic information is the following ):

1. fork (). It creates a new process by copying and calling the process. It is the most basic process creation operation.
2. exec. It includes a series of system calls, in which each system call completes the same function, that is, the process is changed by overwriting the original memory space with a new program. The difference between various exec system calls is that their parameter structures are different.
3. wait (). It provides initial process synchronization measures that can wait for one process until the other process ends.
4. exit (). This system call is often used to terminate a process.

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.