Bash features in a detailed
B, C, K Shell
Shell Shell
Gui:gnome, KDE, XFCE
Cli:sh, CSH, ksh, Bash (preferred), tcsh
Multiple users log on to the system, use the shell, and only one shell program is running, but there can be multiple shell processes.
* Process: In each process it appears that only the kernel and the current process exist on the current host;
A process is a copy of a program
User working environment:
Bash:
#管理员的命令提示符
$ normal User
Exit exits the current shell (child shell)
Pstree
CTRL + A: Skip to the beginning of the command
Ctrl+e: Jump to the end of the command line
ctrl+l: Fullscreen
History-c Empty Command history
After ESC. \alt+. Point
03_03
Linux windows
Clear = CLS
Unalias
Alias Cmdalias = COMMAND
(Command aliases are only valid within the current shell process)
Command replacement: $ (), anti-quote ' COMMANDS???????????????
To create a file named after a date:
Touch file./file-$ (date +%f-%h-%m-%s). txt
@@ "" Weak references can implement variable substitution.
", strong references, do not complete variable substitution.
In general, as long as the use of variables are not involved, single double quotation marks can be.
File name wildcard, globbing
* (asterisk) is a wildcard character: wildcard characters of any length (including no length)
? : Any single character
[]: matches any single character within the specified range
[Abc],[a-m],[a-z],[1-9],[a-za-z]
Example: With the beginning of the letter the middle any character, the number ends:
LS [a-za-z]*[0-9]
[^]: matches any single character outside the specified range
[: Spcae:] : white space characters
[:p UNCT:]: Punctuation
[: Lower:]: lowercase letters
[: Alpha:]: Uppercase and lowercase letters
[:d igit:]: Punctuation
[: Alnum:]: Numbers and uppercase and lowercase letters
#man Glob
03_04
Process (can be obtained if a process is compiled with a shared library, this means that the process must be loaded into memory before it is started.)
The process is in memory and does not execute independently, but by invocation.
The ability of three groups of users to use:
1, the owner of the document;
2. Group of documents;
3, other users;
The process is owned by the owner;
Security context: When the user operates the computer, the process is initiated and the process is the agent of the user operating the computer. So when the process is running, it must be based on the permissions of the user who initiated it.
The permission determination process is done by the kernel. So the process can access what files depend on the permissions of the process and the permissions of the files it accesses.
Permissions: R,w,x
R readable, available command: Cat read
W: writable, can edit or delete files;
File: x: Executable, exacutable (can be submitted to the kernel at the command prompt as a command to run)
Directory:
R: LS can be executed on this directory to list all internal files;
W: Files can be created in this directory;
X: The CD can be switched to this directory, you can also use Ls-l to view the details of internal files;
(the file does not have execute permissions by default and the directory has execute permissions by default.) )
Users: UID,/ETC/PASSWD
Group: Gid,/etc/group (Groups idengtity .... )
Shadow Password:
Users:/etc/shadow
Group:/etc/gshadow
User Category:
Admin: 01 will be "0" id
Normal Users: 1-65535
System Users 1-499
General Users 500-60000
@@@ system users and general users can be differentiated by ID number
User Group Category:
Administrators group:
Administrative groups:
System Group:
General Group:
Private group: When a user is created, a group with the same name as the user name is automatically created if the group to which it belongs is not specified;
Basic groups: Default groups for users,
Additional groups:, additional groups: groups other than the default group
/etc/passwd
Account: Login Name
passwd: Password
Uid:
$1$FHGSFGKJNLDGKJSNLKSJ ($1$) MD5 encryption method
Encryption method:
Symmetric encryption: Encryption and decryption use the same password; symmetric encryption is faster than public key encryption two orders of magnitude
Public Key cryptography: each password appears in pairs, one for the private key (secret key) and one for the public key.
One-way encryption, hashing encryption, extracting data signatures. Used to compare the results of two calculations to determine if they are the same.
1, Avalanche effect: A change password, ciphertext changes very large, even if only one of the password characters
2, fixed-length output:
Md5:message digest,128 fixed-length output
Sha1:secure Hash algorithm,160 bit fixed length output
which useradd find command location
This article is from the "zgysolution" blog, make sure to keep this source http://zgysolution.blog.51cto.com/9605745/1604996
Marco Video Note: 03_02 03_03 03_04