Linux Learning Basics - computer components, the kernel function, common release, the open source protocol, Linux philosophy, the directory structure

1. The composition and functions of the computer

  1.1 Hardware System

        Computer hardware refers to the physical configuration of the computer device. All computers on the basic structure is followed von Neumann architecture. 
        Includes an arithmetic unit, a controller, a memory, input devices and output devices five member. 
        
        Arithmetic 
            operator is a function of various data arithmetic and logical operations, i.e. the data processing. 
        Controller 
            The controller is the central nervous system throughout the computer, the function of the control information is interpreted predetermined program controlled according to its request, scheduler, data, addresses, each part of the work and the coordinating computer peripherals access memory and the like. 
        The memory 
            function of the memory information is to store programs, data and all kinds of signals, commands, etc., and provide this information when needed. 
        
        An output device an input device combined with an external device you, referred peripherals. 
        The input device 
            action program input device is the original data, text, characters, control commands or data collected in the field of information input to the computer. Common input devices have a keyboard, mouse, optical input, tape drives, disk drives, CD-ROM machines. 
        Output device 
            effect the output device is the intermediate result output information out of the computer or outside the final result, various characters or symbols and various kinds of data and control signals inside the machine. Microcomputer output device commonly the CRT display terminal, a printer, a laser printer, plotter, and a magnetic tape, CD-ROM drive and the like.
    

 

  1.2 software system

      Divided into "system software" and "software" two categories 
        System Software 
            System software is the management, control and maintenance of computer and peripheral equipment, to provide software and other aspects of the interface between the user and the computer. Relative to the application software, the system software is near the hardware of the computer system, and away from the user concerns are further away, it is not tailored to the specific application problems. 
        Application software 
            generally refers to those who can directly help individuals or units to complete specific work of a variety of software, such as word processing software, computer-aided design software, enterprises and institutions of information management software and game software. Application software generally can not run independently on the computer and must be supported by system software. 
       The most basic support applications running - the kind of system software is the operating system. Application software, in particular, a variety of special packages are often provided by specialized software vendors.

2. The functions and role of the operating system kernel

    Process management 
   kernel is responsible for creating and destroying processes, and process them in touch with the outside world (input and output). 

    Memory management of 
     the computer's memory is a major resource, the system performance is critical processing strategy it uses kernel for all each of the process of building on the limited resources available to a virtual address space 

    file system 
     almost anything can be regarded as a Unix file in the kernel built a structure on top of unstructured hardware, file system , the result is very much abstract application files in the entire system. in addition, Linux file systems support multiple types, that is, different data is organized on the physical media. 
    For example, the disk may be formatted into a standard Linux ext3 file system , the FAT file system generally used, or several other file systems. device control    almost every system operation ultimately mapped to a physical device. in addition to the processor, memory, and very few other entities, any or all of the device-specific control operation by the device-dependent code to be addressed. these Code called device drivers. Peripheral drive each kernel occurring in the system must be embedded,
driven from the keyboard and the hard drive to tape drive.   Network management  network must be managed by the operating system, since most of the network operation is not specific to one process: the system message is an asynchronous event messages must be collected before a certain process to take over, identification, distribution system is responsible for delivering data packets between the program and the network interface, it must be based on network activity programs.
control execution of the program. in addition, all the routing and address resolution issues are implemented in the kernel.    security mechanism Linux kernel also provides security management context

3. Common Linux distribution, which is associated with differences

Linux distributions, divided from nature, divided by commercial companies maintain commercial and free versions of the release version maintained by the open source community. Different Linux distributions have different characteristics and goals, common are: Redhat, Debian, SuSE, Gentoo , Arch Linux such as 
    Redhat series - including RHEL (Redhat Enterprise Linux, also known as Redhat Advance Server, fee-based version) , Fedora Core (from the original desktop version of Redhat developed from the free version), CentOS (RHEL clone of the community, free), etc. 
        Redhat series of package management is based on the use of YUM package management RPM packages, package distribution method It is compiled binary files. Stability RHEL and CentOS stability is very good, suitable for server use, but somewhat less stable Fedora Core, it is best used only for desktop applications. 
    Debian series - including Debian and Ubuntu. Debian Linux is a community-class model, is by far the most followed standard GNU Linux system. 
    SUSE Linux-- referred SuSE 
    Gentoo-- features Portage package management systems. Different from the package management system APT and YUM binary files such as distribution, Portage is distributed based on the source code must be compiled in order to run for the purposes of large-scale software is relatively slow, but because all software is compiled on the local machine, 
in after a variety of custom compiler optimization parameters, hardware performance of the machine can play to the limit. Gentoo is all Linux distributions installed in the most complex, but after the installation is complete the most manageable version, also run the fastest version in the same hardware environment. Arch Linux --ArchLinux is a preparation for those who want to know all the Linux distributions, because you have to manually install everything, it makes you learn each part of the Linux operating system.

 

4. The difference between the concepts and common open source license (GPL, LGPL, BSD, Apache, etc.

    GPL: the starting point of the GPL open source code / free use and reference / modification / derivative code open source / free, but not allowed to modify the code and derived as a closed-source commercial software distribution and sales. The main content of the GPL is to simply use ( "use" refers to the class library reference, the revised code or derivative of this code) in a software 
the GPL
product, the software product must also be GPL license must also be both open source and free . This is called "contagious." The GPL products as a separate product without any problems, you can also enjoy free advantage.
         Due to the stringent requirements of the use of the GPL GPL library of software products must use the GPL, GPL agreement for the use of open source, commercial software or code division confidentiality requirement is not suitable for integration / adoption as the basis for the development of libraries and secondary . 
LGPL: LGPL is a GPL is designed for use primarily open source libraries agreement. And GPL require any use
/ modify / software library-derived GPL GPL must use different protocols. LGPL allow commercial software library reference (link) mode without using the open source code library LGPL commercial software.
This makes use of the LGPL open source code can be used as a reference library and publish and sell commercial software.
However, if the code changes the LGPL or derivatized, all the modified code, the code involves additional code modifications and derived portions must use the LGPL. Thus the LGPL open source code is very suitable as a third-party commercial software libraries are referenced, but not for those who want to the LGPL code base,
through modifications and derivative way to do secondary development of business software used.
The GPL
/ LGPL are the original author of protecting intellectual property rights, prevent people from copying and use of open-source development of similar products
BSD: BSD open source license agreement is to give the user a lot of freedom. Free to use, modify the source code can also be modified code as open source or proprietary software re-release. Three requirements: If re-released product contains the source code, you must have the original BSD license code in the source code. If you publish only a binary library
/ Software is required in the library / contains the original BSD code protocol documentation and copyright notices in the software. You can not use open source author / agency name and the name of the original product to do marketing. BSD code that encourage code sharing, but the need to respect the copyright of the author of the code. BSD By allowing users to modify and redistribute the code, also allows the use or development of commercial software distribution and sales on the BSD code, so it is an integrated business-friendly agreement. And many of the companies in the selection of open source products when
all BSD protocol of choice, because you can completely control these third-party code can be modified or secondary development when necessary.
License the Apache
2.0  The protocol is similar to BSD and also encourage code sharing and respect the copyright of the original author, also allows code changes, then released (as open source or commercial software). Conditions need to be met and BSD also similar: the need to code the user an Apache Licence If you modify the code, need to be modified in the file description. Extending the code (code and source code modifications are derived) having the same code as the need in the protocol, trademarks, patents, and other statements contained in the original OF predetermined required. If the re-release of the product is included in a Notice file, the file needs to have in the Notice Apache Licence. You can add your own license in the Notice, but not the performance of the Apache Licence to change the constitution. Apache Licence also licensed for commercial use friendly. Users can also modify the code as needed to meet the needs and as open source or commercial product launches / sales.
MIT MIT and BSD license is as wide range of authors want to retain the copyright, without any other restrictions. In other words, you must include a statement of the original license agreement in your distro, no matter you are in binary release or in source code released

5. Linux's philosophy

    1 , everything is a file 

      to almost all the resources all abstract as a file, including hardware devices, and even communication interface 

        Open (), the Read (), the Write (), use Close (), the Delete (), the Create ()

     2 , by the large number single-function programs: a program to do one thing and do 

     a combination of a small program to complete complex tasks

     3 , try to avoid user interaction with the 

      target: easy to programmatically automate tasks

     4, save the configuration information using a text file

 

6.Linux directory structure directory structure to alleviate naming convention

/ Bin: all basic commands available to the user program files
 / sbin: system management utility for use
 / each static files boot loader must be used:: boot Kernel, initramfs (initrd ), grub such as
 / dev: special file storage device or file 
        device has two types: character devices (linear device), a block device (random equipment)
 / etc: the system's profile, only a static
 / home: a centralized location ordinary home directory: generally every normal the default home directory / home / to this end USERNAME
 / root: administrator's home directory, optional
 / lib: start the application (/ bin, / root file system or system sbin, etc.) to provide a shared library, and the kernel providing the kernel module 
        libc.so. * : C dynamically linked library 
        LD *: the runtime linker / loader 
        modules: a user directory stored kernel module
 / the lib64: 64 is 64-bit system-specific storage path shared library
 / Media: the portable device mount point, cdrom, floppy, etc.
 / mnt: other temporary file system mount point
 /opt: Installation location of additional applications: alternative paths
 / SRV: Data provided by the current host for the service
 / tmp: directory program for those who will have to provide temporary files used to store temporary files: for the user to perform a write operation: with special permission
 / usr: usr Hierarchy globally shared, read-only data path 
        bin sbin lib lib64 include (architecture-specific file storage path of the command man pages and comes with documentation, etc.) (C header files) share src program source file storage location
         / usr / local: allows system administrators to install local applications: also commonly used to install third-party programs
 / var: data storage path change often occurs
 / proc: 
   RAM-based virtual file system, used for the core and process memory information: they are mostly kernel parameters, such as net.ipv4.ip_forward, virtual as / net / ipv4 / ip_forward, stored in the / proc / under SYS
 / SYS: 
  sysfs virtual file system provides a more desirable than proc the way to access the kernel of the book: its main role is to provide a unified interface model for the management of Linux devices

 

Guess you like

Origin www.cnblogs.com/43945616b/p/11487712.html