Linux Beginner's Insights

Source: Internet
Author: User

Learning Linux in the understanding that Linux is not the higher the version coefficient is good, but to see if its version features more efficient, stable, secure to determine whether the best version. If you need to replace the new version, it is generally necessary to test in the experimental environment for 3-6 months!
In the Linux root has the extremely high privilege even can achieve the suicide effect, therefore in the work basically rarely directly logs in the root user but uses the ordinary user to log in the system to fail the ordinary user right cannot reach us only then through the root user obtains the higher privilege, thus clears the fault, Change back to normal users immediately after completion.
The philosophical thinking of Linux:
1. All Documents
Linux abstracts almost all of the resources into the form of files, even the hardware, the sockets used for network communication, and the pipelines.
File: A set of streaming data in a storage device with boundaries
2, by a large number of single-function small programs, but can achieve complex tasks
Function List: Each applet only does one thing, and to do it well
Complex tasks: Combine multiple small programs as perfectly as possible to maximize their functionality
3, try to avoid direct interaction with users, easy to implement automated tasks in a programmatic manner
4. Save the program's configuration information using plain text files

  Flat structure management files, efficiency and low
Hierarchy
File system (hierarchical addressing)
  /: Original start
   metadata: Description file Properties
   Data: The contents of the file
in the file system, based on file name reference files, by name to access, in the file system, for the filename has a series of provisions
1, the file name cannot contain "/" character
         "/" means that the root file system
         "/" means the path delimiter
2, the file name cannot be longer than 255 characters
3 , in the same location, the file name cannot be repeated
4, file names require strict case sensitivity
  Use the concept of a path to represent the exact location of a file; 
Path: The hierarchy of directories that must pass when locating a file;
Description of path:
    pair Path:
        the path to find from "/"
     Relative path:
        the path to find from the working directory (current directory)
       .: represents the current directory;
      . : Represents the parent directory of the current directory;
Note: If you are using a relative path, if you do not stop by the absolute path;
     whether the current directory is included in the absolute path of the destination file.
Working directory: E
The absolute path to the M file:/a/e/m, so it is easier to use a relative path;
 /M, usually. You can omit the absolute path of the z file by omitting M
:/d/k/z/, so it may be easier to use an absolute path:
     .. /.. /d/k/z

At the same time, Linux is divided into two operating interfaces: graphical interface and command line interface, respectively.

Home directory: The current directory when each user logs on to the system, and also the starting directory for each user: ~ Generation refers

Any one path can be divided into two parts:
File Base name: basename
File directory Name: dirname
Example:/d/k/z
Z is the base name,/d/k is the directory name

hfs--level Standard
/: (There are many Word files under the root directory)
Bin: normal operation commands that ordinary users can perform
Boot: Boot the operating system to boot the static files, including: Boot program, kernel, INITRAMFS, etc.
Dev:device Equipment
Block devices: Devices that enable data storage, random access
Character devices: Devices that enable data transfer and data processing, sequential access (the display is a character device)
ETC: Storage of the host-specific system configuration file
Home directory root of the home common user
LIB, lib64: Directory table for shared library files, module for kernel
Media: mount point for removable devices
MNT: Temporary file system mount point
Opt: Previously a very popular installation directory for third-party applications (gradually obsolete)
Root: Home directory for Superuser Root
Sbin: Storage of management commands that only Superuser root can perform
SRV: Storage of various service data provided by the system (gradually obsolete)
Tmp:temperate, temporary file directory, automatically clears the directory for data not accessed within 30th, every 30 days
Second root of the usr:linux system, primarily installing third-party applications
/usr/local third, primarily for compiling and installing third-party applications
/USR/SRC: Store The application's source code
Ver: Data that can be changed
Pseudo File System:
Proc:process, Process
Sys:system

File type: the
Depending on the color:
Black or White: plain text file
Green: Executable file
Yellow: Device File
Red: Package file (Zip, archive, package)
Dark blue: Catalog file
Azure: Symbolic link file, equivalent to Windows shortcut
Purple: Socket File
Brown: Pipe File
by tag:
-: Text File
B: Block device
C: Character device
D: Catalog file
L: Symbolic Link file
P: Pipeline File
S: Socket file

Command Prompt:[[email protected]~]#   [user logon name @ non-full format hostname working directory]#|$
Root (front): User account name currently logged in
Mylab11 (middle) : Computer name in a non-full format
~ (later): The current directory at the time the command was executed (Currunt directory), also called the Working directory (working directory), the ~ symbol represents the user's home directory
#: Command Prompt
    #: Super User root
   $: Normal user
program typically contains four types of files:
Binaries: Executables
    Windows:exe (execute) MSI
    linux:elf
Api:application Programming Interface, application programming Interface
     POSIX: Software Development Interface International standard (Portable Operating system portable OS)
Abi:application Binary Interface Application Binary interface
header file/library file:
    windows:dll (dynamic linked library) Dynamics Gallery
    Linux:so (Shared object) Share library  
           Ko (kernel Object) Kernel library
               a static library
    Help files: instruction manual The
Profile: Configure program Parameters
Command itself is actually a binary file!
  Commands format:
command options Arguments[parameters]

Command: The action body that you want to perform, the process
Internal command: Commands built into the shell
External command: Commands obtained by installing an application
The first execution is looked up through the path in the path variable, and later as long as there is still a cache record in the hash cache, the path variable is no longer found and the cache is looked up directly.
Use the type command to see whether a command is internal or external.
Tape (whether the query command is an internal command or an external command)

Options: The attributes used during this command execution
Short options:
-char
Can write more than once,-a,-l,-d ==>-ald
Long options:
-word:--help--list--human-readable
Long options cannot be combined to write, only one
Attention:
1. Some options require additional parameters
2. Some options can not be used-boot, some of the command options must not be added-
3. The long options for some commands use one-

Arguments (Parameters parameter): Action object executed by this command
Some commands can have multiple parameters at the same time, but they must be separated by white space characters between the parameters.



Note:
     1. Command (command), options (option), Arguments (parameters parameter) must be separated by white space characters when writing.
     2. Some commands can be swapped in the options (command) and arguments (parameters parameter) positions when writing.
     3. All components of the command are strictly case-sensitive. (Strict file system requirements)

Get help with command:
[]: You can omit to write, or you can fill it out as needed:
<>: Must write
... : More
A|b|c: Multi-rotor
Xxxxx.gz (Linux compression package)
    Tape (query command is internal or external)
Internal command:
     Help
1. Using the--HELP option
2.man (manual)
        man Nine chapters
           1. User commands (common commands that all users can perform)
            2. System calls
           3. C Library Functions
           4. Devices and special files
                5. Configuration file Format
            6. Game-related Help information
           7. Miscellaneous
           8. Management class commands (only administrative commands that can be executed by root)
            9. Kernel-related

There are many fields in each man Handbook:
Name: Description of the program and related functions
Synopsis: Syntax format used by commands
Description: Detailed description information of the program
Options: A detailed description of the use and meaning of the option
Author: Author information for the program
Reporting Bugs: How to report bugs contained in a program
Examples: Example of command usage
See also: Additional reference content
Files: Other files related to the program, such as configuration files, etc.


This article from "12443570" blog, declined reprint!

Linux Beginner's Insights

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.