People who have used the Linux system know that the Linux system view user is not the same as Windows, the right mouse button to see my Computer properties, and then look at the computer users and groups. So what do you do when looking at all the users in the Linux operating system? With the command. In fact, it is easy to see which users are in the Linux system with the command.
1. View all users in Linux
(1) in the terminal. In fact, only need to view the/etc/passwd file on the line.
(2) Look at the third parameter: More than 500, is the user behind the build. Others are users of the system.
or with cat/etc/passwd |cut-f 1-d:
2. User Management commands
Useradd Note: Add Users
AddUser Note: Add Users
passwd Note: Set a password for the user
Usermod Note: Modify the user command, can be usermod to modify the login name, the user's home directory and so on;
Pwcov Note: Synchronizing users from/etc/passwd to/etc/shadow
PWCK Note: Pwck is to verify that the user profile/etc/passwd and/etc/shadow file contents are legitimate or complete;
Pwunconv Note: Is the pwcov of the reverse operation, is to create/etc/passwd from/etc/shadow and/etc/passwd, and then delete the/etc/shadow file;
Finger Note: View the user Information tool
ID Note: View the user's UID, GID, and user group to which they belong
CHFN Note: Change user Information tool
SU Note: User Switching tool
sudo note: sudo is executed by another user (execute a command as another user), SU is used to switch users, and then to complete the corresponding task by switching to the user, but sudo can execute commands directly, such as Sudo You do not need the root password to perform root assignment only root can execute the corresponding command, but the Visudo to edit the/etc/sudoers to achieve;
Visudo Note: Visodo is the command to edit the/etc/sudoers, or you can use the VI to edit the/etc/sudoers effect is the same without this command;
Sudoedit Note: Same as sudo function;
3. Tools or commands for managing user groups (group);
Groupadd Note: Add user group;
Groupdel Note: delete user group;
Groupmod Note: Modify user group information
Groups Note: Displays the user group to which the user belongs
Grpck
GRPCONV Note: Synchronize or create/etc/gshadow with the file contents of/etc/group and/etc/gshadow, or create if/etc/gshadow does not exist;
Grpunconv Note: Synchronize or create/etc/group with/etc/group and/etc/gshadow file contents, then delete the Gshadow file
Linux View what commands are used by all users 1