Command aliases
Alias cmdalias= ' COMMAND [options] [arguments] '
Aliases defined in the shell are valid only in the current shell life cycle: The valid range of aliases is only the current shell process
Command substitution: $ (command), anti-quote: ' command '
To replace a subcommand in a command with the process of executing the result
Quotes supported by bash:
": Command substitution
"": weak reference, can implement variable substitution
': Strong reference, do not complete variable substitution
File name wildcard, globbing
*: Any character of any length
?: any single character
[]: matches any single character within the specified range
[^]: matches any single character outside the specified range
[: Space:]: white space character
[:p UNCT:]: Punctuation
[: Upper:]: Uppercase
[: Lower:]: lowercase letters
[: Alpha:]: Uppercase and lowercase letters
[:d igit:]: Number
[: Alnum:]: Numbers and uppercase and lowercase letters
Users, Groups, permissions
Permissions:
R,w,x
To the file:
R: Readable, you can view the contents of the file using commands like Cat
W: section write, you can edit or delete this file:
X: Executable, can be submitted to the kernel at the command prompt as a command to run
Directory
R: You can perform LS on this directory to list all internal files
W: You can create files in this directory
X: You can switch to this directory using a CD, or you can use Ls-l to view the details of internal files
Rwx
0---: No permissions
1 001--x: Execution
2 010-w-: Write
3 011-wx: Write and Execute
4 r--: Read-only
5 101 R-x: Read and Execute
6 rw-: Read and Write
7 111 rwx: Read and write execution
Users: UID,/ETC/PASSWD
Group: Gid,/etc/group
Shadow Password:
Users:/etc/shadow
Group:/etc/gshadow
User Category:
Admin: 0
Normal Users: 1-65535
System users: 1-499
General Users: 500-60000
User groups:
Administrators group:
Normal Group:
System Group:
General Group:
User Group Category:
Private group: When you create a user, a group that has the same name as the user name is created automatically for a group that is not a specified member
Basic group: Default group for users
Additional groups: Additional groups: Groups other than the default group
/etc/passwd file
Account: Login Name
Password: password
Uid:
GID: Basic Group ID
Comment: Notes
Home dir: Home directory
Shell: User does not have a default shell
/etc/shadow
Account: Login Name
Encrypted Password: encrypted password
Encryption method:
Symmetric encryption: Encrypt and decrypt using the same password
Public Key cryptography: Each encryption appears in pairs, one for the private key (secret key), and one for the public key
One-way encryption, hash encryption: Extracting data signatures, often used for data integrity checks
1. Avalanche effect
2, fixed-length output
Md5:message digest,128 fixed-length output
Sha1:secure Hash algorithm,160 bit fixed length output
Add Users:
Usreadd NAME: New user
passwd NaME: Modify user Password
To add a group:
Groupadd NAME: New Group
20141208 Study Notes