first, the operating systemos:operating System, software program for general purpose
Hardware Drivers
Process Management
Memory management
Network management
Security management
File Management
OS classification:
Server Os:rhel, CentOS, Windows server, AIX
Desktop Os:windows 10,windows 7,mac Os,fedora
Mobile device os:android, IOS, YunOS
II. development of Interface StandardsAbi:application Binary Interface
The ABI describes the underlying interface between the application and the OS, allowing the compiled target code to run without modification in a system that uses a compatible ABI
Api:application Programming Interface
The API defines the interface between the source code and the library, so the same source can be compiled in any system that supports this API
Posix:portable Operating System Interface
A series of API standards defined by EEE on the operating system
POSIX-compatible programs can be compiled and executed on other POSIX operating systems
Run Program format:
Windows:exe,. dll (dynamic link library),. lib
Linux:elf,. So (Shared object),. A
third, programming languageLow-level language
Machine language: 0 and 1
Assembly language: Corresponds to machine one by one, unique hardware-related code, driver development
Intermediate Language: C
System-level applications, drivers
Advanced Language: python,go,java,objective-c,c#,php
Application-level program development
Four
server three major operating systemsWindows:linux:gnu/linux unix:1969 Ken Thompson
System:bell Lab
AIX (IBM)
Solaris (SUN)
HP-UX (Hewlett-Packard)
BSD: (BSRG) Berkeley System distribution
NetBSD
Openbsd
Freebsd
v. UnixHistory 1965 before and after Multics
Bell Labs, MIT, General Electric initiated
1969 Unix Embryonic UNICs
Ken Thompson Assembly Language B
1973 formally named Unix
Dennis Ritchie C language
1977 BSD
Berkeley Software Distribution Berkeley University
1979 System v Architecture copyright notice
Hp-unix IBM AIX "Do not provide source code for students" reclaim copyright
1984 Minix Operating system
Andrew S. Tanenbaum Computer Science Department, Amsterdam Free University, Netherlands
vi. origin of LinuxOn the October 5 of 1991, Torvalds a message on the Comp.os.minix News Group, formally announcing his own complete free free kernel birth (freeminix-like kernel sources for 386-at) ——— Freax Unix-like kernel, published under the GPL: www.kernel.org Linux operating system:
Complete UNIX-like operating system
Linux kernel + GNU tools
such as: centos,ubuntu,android
Seven
Linux distributionsSlackware:suse Linux Enterprise Server (SLES)
openSUSE Desktop
Debian:ubuntu,mint Redhat:RHEL:RedHat Enterprise Linux
Release a new version every 18 months
CentOS: Rhel-compatible format
Kirin: Winning software
Fedora: Release a new version every 6 months
ArchLinux: Lightweight and simple Gentoo: Extreme performance, no traditional installation program lfs:linux from scratch homemade Linux android:kernel+busybox (toolset) +java virtual Machine
Viii. Open Source AgreementThe world's Open source license, there are probably hundreds of
GPLv2, GPLv3, LGPL (lesser): general Public License copyleft
Apache:apache
Bsd:bsd
Mozilla
Apache
MIT
Nine, command promptCommand prompt: Prompt
[Email protected] ~]#
# Admin $ normal User
Show prompt format
[[Email protected] ~] #echo $PS 1
Modify the prompt format
ps1= "\[\e[1;5;41;33m\][\[email protected]\h \w]\\$\[\e[0m\]"
\e \033 \u Current User
\h hostname for short \h host name
\w Current working directory \w current working directory base name
\ t 24-hour time format \ t 12-hour time format
\! Command history number \# command history after boot
10. Execution of ordersEnter command and return
Draw the shell program to find the executable program or code corresponding to the typed command and parse it and submit it to the kernel to allocate resources to run it.
Commands that can be executed in the shell have two types of internal commands: The shell comes with it and is provided by a command
Help Internal Commands list
Enable CMD enables internal commands
Enable–n cmd Disable internal commands
Enable–n View all the disabled internal commands
External command: A corresponding executable program file under the file system path
View path: Which-a |--skip-alias; Whereis
The difference between the specified command is an internal or external command
Type COMMAND
11. Simple commandShutdown: Halt, Poweroff, init 0 restart: reboot, init 6
-F: Force, do not call shutdown
-P: Power off
Shutdown or restart: shutdown
shutdown [OPTION] ... Time [MESSAGE]
-r:reboot
-h:halt
-c:cancel
Time: No designation, default equivalent to +1
Now: Immediately, equivalent to +0
+m: Relative time notation, after a few minutes; for example, +3
HH:MM: Absolute time indication, specify time
User login Information View command:
WHOAMI: Displays the currently logged in active user
Who: All current logon sessions for the system
W: All current logon sessions and actions made by the system
echo Command function: Display character syntax: echo [-nee][string] Description: Echo will send the input string to standard output. The output strings are separated by white space characters, and the line break number option is added at the end:
-E (default) does not support \ Interpret feature
-N Not wrap line
-e enable \ character interpretation function
U Display variables
echo "$VAR _name" variable is replaced with weak reference
Echo ' $VAR _name ' variable does not replace, strong reference
Command replacement: $ () or '
To print the output of one command to the parameters of another command
echo "This system ' s name is $ (hostname)"
This system ' s name is server1.example.com
echo "I am ' whoami '"
I am root
Bracket extension: {}
Print a simplified form of a repeating string
Echo file{1,3,5}
File1 File3 File5
Rm-f file{1,3,5}
echo {1..10}
echo {A.. Z
echo {000..20..2}
12. Tab keyCommand completion
Internal command:
External command: Bash searches for a file named after a given command name from the left and right, based on the path defined by the PATH environment variable, the command to be executed the first time it is found
The user-given string has only one unique command, which complements the entire
Otherwise, tab again will give the list
Path completion
Takes the user-given string as the beginning of the path and searches for the file name at the beginning of the specified string, under its specified ancestor directory
If only: the direct complement
Otherwise: tab to the list again
13.
Command Line HistorySave the command history you entered. You can use it to repeatedly execute commands when you log in to the shell, the commands that are recorded in the command history file are read ~/.bash_history the newly executed commands are only recorded in the cache after they are logged in to the shell, and these commands repeat the previous command when the user exits "append" to the command history file , there are 4 ways to repeat the previous command using the UP ARROW keys, and enter to perform the press!! and enter to execute input!-1 and enter to perform press ctrl+p and enter to execute!:0 Executes the previous command (remove parameter)!n executes the history command output corresponding to the ordinal N of the command!-n to perform the last nth command of the historical record using the up and down keys to navigate up and down the previously entered command C Trl-r to search for commands in command history (Reverse-i-search) ": Ctrl+g: Exit from historical search mode to recall the last parameter in the previous command:!$ represents ESC. (After you click the ESC key Release, and then tap. Key) Alt +. (Hold down the ALT key while you click.) Key) History [-c] [-D offset] [n] history-anrw [filename] history-ps arg [arg ...]
-C: Empty command history
-D Offset: Delete the specified offset command in history
N: Show the recent n history
-a:append, append the newly executed command history list to the history file for this session
-r: Read history file attached to History list
-W: Save History list to specified history file
-N: Read unread rows to History list in history file
-P: Expands the history parameter into multiple lines, but does not exist in the history list
-S: Expands the history parameter into a row, appended to the history list
、
14. Command HelpInternal command: Help command
Mans Bash
External commands: (1) Command--help
Command-h
(2) User manual (manual)
Mans COMMAND
(3) Information page
Info COMMAND
(4) Help documentation for the program itself
Readme
INSTALL
ChangeLog
(5) Official program document
Official site: Documentation
(6) Official documents of the release version
(7) Google
--help OptionsDisplays the usage summary and most of the parameter lists used, but not all of the examples:
Date--help
usage:date [OPTION] ... [+format] or:date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]
[] indicates an option
Caps or <> indicates changes in data
... Represents a list
X |y| Z means "x or Y or z"
-abc means-a-b–c.
{} means grouping
Man commandThe File manual page that provides command help is stored in/usr/share/man almost every command has a man's "page" of the man page grouped into different "chapters", collectively known as the Linux Manual Man command configuration file:/etc/man.co Nfig | Man_db.conf
Manpath/path/to/somewhere: Indicates the man file search location
Man-m/path/to/somewhere Command: Search the command command's hand album to the specified location and display the Chinese man needs to install the package MAN-PAGES-ZH-CN
Man help paragraph descriptionThe paragraph description in the Help manual:
- Name and brief description
- Synopsis Usage Format Description
- [] Optional content
- <> Required Content
- A|b two Choose one
- {} grouping
- ... The same content can appear multiple times
- DESCRIPTION Detailed description
- Options description
- EXAMPLES Example
- Files Related Documents
- AUTHOR author
- COPYRIGHT Version Information
- REPORTING BUGS Bug Information
- See ALSO other Help references
Man helpView Man manual page
Man [Chapter] keyword
List all Help
Man–a keyword
Search Man Manual
man-k keyword list all matching pages
Using the Whatis database
Equivalent to Whatis
man–f keyword
Print the path to the man Help file
man–w [Chapter] Keyword
Man commandHow to: Use the less command to implement the man command
Space, ^v, ^f, ^f: Flip the screen to the end of the file
B, ^b: Flip the screen to the file header
D, ^d: Turn half screen at the end of the file
U, ^u: Turn half screen to file header
RETURN, ^n, E, ^e or J or ^j: Flip a line to the end of the file Y or ^y or ^p or K or ^k: Flip a line to the file header
Q: Exit
#: Jump To Line #
1 g: Back to File header
G: Turn to the tail of the file
Man Search/keyword:
Searches the end of the file from the current position with the string specified by keyword as the keyword;
N: Next
N: Previous
? KEYWORD:
The string specified by keyword is the keyword, and the file header is searched from the current position;
N: Same direction as search command, next
N: Follow the search command in the opposite direction, previous
Linux Basics and Help