Linux Essentials for All stacks

Source: Internet
Author: User
Tags temporary file storage

Linux is almost ubiquitous, whether it is server building or client development, and the basic skills of the operating system are essential to the full stack.


Selection of the system


Linux distributions can be broadly divided into two categories, one of which is a distribution version maintained by a commercial company, a release version maintained by a community organization, and the former is represented by the famous Redhat (RHEL), which is represented by Debian.


Redhat, which should be called the Redhat series, includes Rhel, Fedora, CentOS (community clone version of Rhel, free). Ubuntu is strictly not a standalone release, and Ubuntu is based on Debian, a nearly perfect Linux desktop system that has all the benefits of Debian and the advantages it has to enhance. The Ubuntu community believes that practicality and innovation are above all.


If you need a more stable server system, then the best choice is CentOS, after the installation, after the simple configuration to provide a very stable service. But for cloud environments, Unbantu may be good, and Hadoop was first developed on Ubantu.


System structure


Understanding the architecture can have a better sense of direction. Linux has kernel and user two modes, the kernel, shell and file system together form a basic operating system structure, the Linux kernel consists of the following parts: memory management, process management, device drivers, file systems and network management.



Linux kernel


Understanding the Linux kernel allows you to make the most of your resources and have a sense of purpose when tuning your system.



Linux divides memory into easy-to-handle "memory pages", providing abstractions of the 4KB buffers, such as the slab allocator. A process is actually a running entity for a particular application, and process scheduling controls the process's access to the CPU. Common inter-process communication mechanisms in Linux are signals, pipelines, shared memory, semaphores, sockets, and so on. The kernel provides an API through the SCI to create a new process (fork, exec, or Posⅸ), stop the process (kill, exit), and communicate and synchronize between them (signal or posⅸ mechanism).


The Linux operating system combines a separate file system into a hierarchical tree structure, and a separate entity represents the filesystem. Because Linux supports many different file systems, it organizes them into a unified virtual file system. The device driver provides a set of operating systems that understand the abstraction of interface completion and the interaction between the operating system, and the specifics of hardware-related operations are done by the device driver. The network portion of the Linux kernel consists of BSD sockets, network protocol layers, and network device drivers. The network device driver is responsible for communicating with the hardware device, and each of the possible hardware devices has a corresponding device driver.

Linux file system


Linux system can support a variety of popular file systems, recommended with EXT4.

Linux The following file types are mainly:

1) ordinary files, divided into plain text and binary.

2) directory files, where files are stored.

3) links to files that point to the same file or directory.

4) device files, divided into block devices and character devices.

5) pipeline file to provide interprocess communication

6) socket file, related to network communication


Linux uses a standard directory structure, and the installer has created a file system and a complete and fixed directory composition for the user, specifying the role and file type of each directory.


Directory Name Brief description
/bin binary Executable command
/dev Device Special files
/etc system administration and configuration files
/ETC/RC.D startup configuration files and scripts
The base point of the home user directory, such as user ABC's home directory is 1113.www.qixoo.qixoo.com/home/user, can be represented by ~ABC
/lib Standard Programming Library
/sbin System Management commands, which are stored in the hypervisor used by the system administrator
/tmp Common temporary file storage point
/root system Administrator's home directory
The/MNT system provides this directory to allow users to temporarily mount other file systems.
/lost+found This directory is usually empty, the system is not properly shutdown and left "homeless" files
/proc a virtual directory, which is a mapping of system memory. This directory can be accessed directly to obtain system information.
/var overflow area for some large files, such as log files for various services
/usr The largest directory, the applications and files to be used almost all in this directory. These include:
/USR/X11R6 the directory where x window is stored
/usr/bin a multitude of applications
/usr/sbin Some management programs for super users
/usr/doc Linux Documentation
/usr/include the header files needed to develop and compile applications under Linux
/usr/lib Common dynamic-link libraries and package profiles
/usr/man Help Documentation
/USR/SRC source code, the Linux kernel source is placed in the/usr/src/linux
/usr/local/bin Local Add-on command
/usr/local/lib local additions to the library


The shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command entered by the user and sends it to the kernel to execute, which is a command interpreter. There are many types of shells, and bash is recommended here. Bash is the GNU Bourne Again Shell, the default shell on the GNU operating system, and most Linux distribution kits use this shell. Linux Shell and commands

There are many commands for Linux, and a simple classification is given below.



It is shell programming to organize the Linux commands in the shell to complete a series of tasks. Shell,perl and Python are the most common scripting languages on Linux, and I recommend using Python.

Linux applications


Standard Linux systems generally have a set of assemblies called applications, including text editors, programming languages, X windows, Internet Tools, and databases.


For text editing, Emacs and Vim are the same, and can be used even as an IDE through plug-ins. As a personal feeling, VIM should also be an essential skill. Vim commands are also many, organized as follows:


As far as application management is concerned, Ubuntu needs to be familiar with apt commands, while CentOS is the Yum command. Of course, the source code compilation installation is necessary, makefile the wording of the configure/autoconfig/make, the use of extremely easy only good.

Linux Essentials for All stacks

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.