There are many commonly used commands in Linux that must be mastered, such as system management commands, so what are the Linux system management commands? Here I will share the commonly used basic system management commands, which are absolutely practical and dry, collect and learn!
1、whois
Function description: Find and display user information.
Syntax: whois [account name]
Supplementary note: The whois command will search and display the user-related information of the specified account, because it is searched in the whois database of network solutions, so the account name must be registered on it to be found, and the name has no difference in case.
2、whoami
Function Description: Display your own user name
Syntax: whoami [--help] [--version] [separator]
Supplementary Note: To display your own user name, this command is equivalent to executing the id -un command.
3、who
Function Description: Display the user information currently logged into the system
Syntax: who[-himqsw][--help][--version][am i][log file]
Supplementary note: Execute this command to know which users are currently logged into the system. Execute the who command alone will list the login account, the terminal used, the login time, and where to log in or which display is being used.
4、w
Function Description: Display the user information currently logged into the system
Syntax: w[-fhlsuv][username]
Supplementary note: Execute this command to know who are the users currently logged into the system and the programs they are executing. Executing the w command alone will display all users, and you can also specify a user name to display only the relevant information of a certain user.
5、usermod
Function description: Modify user account
Syntax: usermod [-lu][-c <remark>][-d <login directory>][-e <expiration date>][-f <buffer days>][-g <group>][-g < group>][-l <account name>][-s][-u][user account]
Supplementary note: usermod can be used to modify the settings of the user account
6、userdel
Function description: delete user account.
Syntax: userdel[-r][user account]
Supplementary Note: userdel can delete user accounts and related files. If no parameter is added, only the user account will be deleted without deleting related files.