2019-2020-1 20199327 "Linux kernel principle and Analysis" in the first week of operation

Introduction to Linux

1. Linux is an operating system, mainly that two calls and kernel                      

2. C language and NUXC Father: Dennis Ritchie and also Ken Thompson

3. Linux and the main difference between Windows systems

Features: Windows system intuitive and efficient graphical user interface, object-oriented graphical user interface does not use a computer background knowledge is very beneficial, Windows user interface and development environment is object-oriented, this mode of operation simulates the real world behavior, easy to understand, learn and use; strong Linux applicability. Get way: each specific feature windows system may need the support of commercial software, you need to purchase the appropriate authorization; Linux system, most of the software is free to get the same features of the software selection is less. Open source: Linux system completely open source code; Windows system, leaving only the necessary interfaces

Basic concepts and operations

1. essentially corresponding to the terminal on the Linux / dev / TTY device

2. In the UNIX / Linux more popular common Shell have bash, zsh, ksh, csh, etc., Ubuntu terminal used by default is bash, the default desktop environment is GNOME or Unity (based on GNOME), but our environment It is used zsh and xfce.

3. Cd command: enter a directory

( . 1) CD into the user's home directory ( 2) CD ~ enter the user's home directory ( . 3) CD - Returns the directory before entering the directory ( . 4) CD .. go back one level

Wildcard: *: matches zero or more characters;? : Match any one character; [list]: matching list of any single character ; [^ list]: In addition to matching characters other than list of any single character [c1-c2] match c1-c2 in any single character ; { c1..c2} matches c1-c2 of all characters.

4. Common shortcut keys: the Tab key for command completion; the Ctrl + C keys to forcibly terminate the current procedure;

Ctrl + a cursor to the first input line, rather Home key; ctrl + D terminal keyboard input or exit end; key on the previous instruction executed. Help command: Help, man, info.

Power user and file management

Linux to create, view, delete

View: users $ who am i or $ who mom likes

         User groups using the groups command; see the / etc / groups file

创建:sudo adduser  ;touch   ;mkdir    ;

删除:$ sudo deluser lilei --remove-home

Copy: cpa

The Linux file permissions

View : ls command; change : chmod command; permission to modify : digital-to-read and write binary sentenced to execution;

adduser and differences useradd: useradd will add a user, it did not create the home directory, in addition to adding a new user than nothing. The user can not even log in, because there is no password. The correct approach is the man page says, adduser, this command is actually a perl script is more user-friendly front-end similar underlying useradd commands, it will create a new user with interactive way with which you can specify a new user home directory, login password, is encrypted home directories, etc.

The directory structure and basic operation

1. FHS Standard: a standard file system hierarchy, specifies the type of file and directory storage type FHS specification defines two layers, a first layer, the / each directory below what file data should be put, for example, / etc should be placed is provided file, / bin and / sbin should be placed in the executable file, and so on. For the second layer is / usr and to define the subdirectory / var two directories. For example, / var / log placement system log files, / usr / share data and the like disposed Share.

2. Use the pwd obtain the current path.

View these commands absolute path to it by whereis / which, the difference:

which is used to view the path of the current command to be executed is located.

whereis used to view the path of a command or file.

principle which commands: the PATH variable specified path, the location of a search system commands, and returns the first search results. The use of which command, you can see whether there is a system command, and in the end which is a position of command execution.

whereis command principle: You can only search for the program name, and only search binary files (parameter -b), man documentation (parameter -m) and source code files (parameter -s). If the parameter is omitted, all the information is returned.

 

Guess you like

Origin www.cnblogs.com/waxxx/p/11524995.html