One
1. View the user
The command is as follows: WhoAmI
2. Create a user
Create user command: sudo adduser hello
Super User is Root
Delete user name command: sudo deluser hello--remove-home
Switch User login command: su-l Hello
3. User groups
Groups
View user groups command: Cat/etc/group
Or: Cat/etc/group | Sort (so that the displayed data is in dictionary order)
Create User group: Usermod
Ii. Permissions for Linux files
1. Permissions View
View Permissions command: Ls-l
View all file Permissions command: Ls-al
Linux all the text!!!!
Notice of file permissions:
The content shown in the analysis is as follows:
D stands for file rwx, which represents read, write, and Execute permissions, where "-" indicates that there is no such permission
Drwxrwxr-x: The first three rwx represents the root permission, the middle three rwx represents the permissions of the other user, and the last three represents the permissions of the members in the group.
Permissions can be changed, with the following command:
chmod g+w Hello
This command means adding the Write permission to the Hello file for the group member's permissions!!
2. Owner of the change file
The code is as follows:
Eg:sudo chown Hi document; CP Document/home/hi
The command analysis is as follows: The hi here represents a non-root user, and the file to be changed is document.
3. File Permissions Supplement
In addition to using chmod g+w hello in this way, we can also use the following way chmod 777 Hello this way
7 represents the RWX permission, where R is the value of 4,w is the value of 2,x is 1, their values are 2 squared, 2 of the first and 2 of the 0 parties.
The "G" represents the group
"O" means other.
"U" represents the user
Linux User Create delete and file permissions view changes