Linux system management command set (1)

Source: Internet
Author: User
Tags addgroup

Whois

Function Description: search for and display user information.

Syntax: whois [Account name]

Note: The whois command will search for and display the user information of the specified account, because it is found in the WHOIS database of Network Solutions, so the account name must be registered above for retrieval, the name is case-insensitive.

---------------------------------------------------------


Whoami

Function Description: The user name is displayed first.

Syntax: whoami [-- help] [-- version]

Note: The user name is displayed. This command is equivalent to executing the "id-un" command.

Parameters:
-- Help Online help.
-- Version: displays the version information.

---------------------------------------------------


Who

Function Description: displays the user information currently logged on to the system.

Syntax: who [-Himqsw] [-- help] [-- version] [am I] [record file]

Note: If you execute this command, you can find that there are currently users logging on to the system. If you execute the who command separately, the logon accounts are listed.
Terminal, Logon Time, and where to log on or which X monitor is being used.

Parameters:
-H or -- heading displays the title information columns of each column.
-I or-u or -- idle indicates the idle time. If the user performs any action within the previous minute, it indicates ". ", if the user has not performed any action for more than 24 hours, the" old "string is displayed.
-M this parameter has the same effect as the specified "am I" string.
-Q or -- count only displays the name and total number of accounts logged on to the system.
-S this parameter will be ignored and will not be processed. It is only responsible for solving compatibility issues with other versions of the who command.
-W or-T or -- mesg or -- message or -- writable displays the user information status bar.
-- Help Online help.
-- Version: displays the version information.

----------------------------------------------------


W

Function Description: displays the user information currently logged on to the system.

Syntax: w [-fhlsuV] [user name]

Note: If you execute this command, you can find out who are currently logged on to the system and the programs they are executing. Run w
The command displays all users. You can also specify a user name to display only information about a user.

Parameters:
-F. enable or disable the function to show where the user logs on to the system.
-H: The title information column of each column is not displayed.
-L use the detailed format list, which is the default value.
-S uses a concise format list, which does not display the User Logon Time, CPU time consumed by terminal jobs and programs.
-U ignores the name of the execution program and the CPU time consumed by the program.
-V displays the version information.

-----------------------------------------------------


Vlock (virtual console lock)

Function Description: Lock a virtual terminal.

Syntax: vlock [-achv]

Note: Executing The vlock command can lock the virtual terminal to prevent other users from using it.

Parameters:
-A or -- all locks a terminal-phase job. If you use this parameter on a full-screen terminal, the keyboard is used.
The function of switching the terminal is disabled.
-C or -- current locks the current terminal-phase job, which is the default value.
-H or -- help Online help.
-V or -- version displays version information.

--------------------------------------------------------


Usermod

Function Description: modify a user account.

Syntax: usermod [-LU] [-c <remarks>] [-d <logon directory>] [-e <validity period>] [-f <buffer days>] [-g <group>] [-G <group>] [-l <Account Name>] [-s] [-u] [User Account]

Note: usermod can be used to modify user account settings.

Parameters:
-C <remarks> modify the remarks of the user account.
-D logon directory> modify the directory when a user logs in.
-E <validity period> modifies the validity period of an account.
-F <buffer days> change the number of days after the password expires to close the account.
-G <group>: Modify the group to which the user belongs.
-G <group> modify the additional group to which the user belongs.
-L <Account Name> modify the user account name.
-L lock the user password to make it invalid.
-S: Modify the shell used after user login.
-U: Modify the user ID.
-U unlocks the password.

-------------------------------------------------------


Userdel

Function Description: delete a user account.

Syntax: userdel [-r] [User Account]

Note: userdel can delete user accounts and related files. If no parameter is added, only the user account is deleted, and related files are not deleted.

Parameters:
-F Delete the user's logon directory and all files in the directory.

----------------------------------------------------------


Userconf

Function Description: sets a program for a user account.

Syntax: userconf [-- addgroup <group>] [-- adduser <user ID> <group> <User Name>] [-- delgroup <group>] [-- deluser <user ID>] [-- help]

Note: userconf is actually a symbolic connection to linuxconf and provides graphical interface operations for administrators to establish and manage various accounts. If no parameters are added, the graphic interface is displayed.

Parameters:
-- Addgroup <group> adds a group.
-- Adduser <user ID> <group> <User Name> adds a user account.
-- Delgroup <group> deletes a group.
-- Deluser <user ID> deletes a user account.
-- Help: displays help.

------------------------------------------------------


Useradd

Function Description: create a user account.

Syntax: useradd [-mMnr] [-c <remarks>] [-d <logon directory>] [-e <validity period>] [-f <buffer days>] [-g <group>] [-G <group>] [-s] [-u] [User Account] Or useradd-D [-B] [-e <validity period>] [- f <buffer days>] [-g <group>] [-G <group>] [-s]

Note: useradd can be used to create a user account. After the account is created, use passwd to set the password of the account, and use userdel to delete the account. The account created using the useradd command is actually saved in the/etc/passwd text file.

Parameters:
-C <remarks> Add remarks. The remarks are saved in the remarks field of passwd.
-D <logon directory> specifies the start directory for user login.
-D. Change the default value.
-E <validity period> specifies the validity period of the account.
-F <buffer days> specifies the number of days after the password expires.
-G <group> specifies the group to which the user belongs.
-G <group> specifies the additional group to which the user belongs.
-M automatically creates the user's logon directory.
-M: do not automatically create a user's logon directory.
-N cancel creating a group named by the user name.
-R: Create a system account.
-S specifies the shell used after the user logs on.
-U indicates the user ID.

----------------------------------------------------


Uname

Function Description: displays system information.

Syntax: uname [-amnclr] [-- help] [-- version]

Note: uname displays information about the computer and operating system.

Parameters:
-A or -- all displays all information.
-M or -- machine displays the computer type.
-N or-nodename indicates the host name displayed on the network.
-R or -- release displays the release number of the operating system.
-S or -- sysname: displays the operating system name.
-V: displays the version of the operating system.
-- Help: displays help.
-- Version: displays the version information.

-----------------------------------------------------


Top

Function Description: displays and manages programs in execution.

Syntax: top [bciqsS] [d <interval seconds>] [n <execution times>]

Note: Execute the top command to display the programs currently being executed in the system, and manage them using hotkeys through the interactive interface provided by it.

Parameters:
B uses the batch processing mode.
C. When listing programs, the complete commands of each program are displayed, including the command name, path, parameters, and other information.
D <interval seconds> set the interval between the execution status of the top monitor, measured in seconds.
When I run the top Command, ignore idle or Zombie programs.
N <execution count> set the number of metric information updates.
Q: continuously monitors program execution status.
S uses the confidential mode to eliminate potential crisis in the interactive mode.
S uses the accumulative mode. The effect is similar to the "-S" parameter of the ps command.

------------------------------------------------------


Tload

Function Description: displays the system load status.

Syntax: tload [-V] [-d <interval seconds>] [-s <scale size>] [terminal number]

Note: The tload command uses ASCII characters to display the System Load Status in text mode. If no terminal number is assigned, the load is displayed on the terminal that executes the tload command.

Parameters:
-D <interval seconds> sets the interval between tload and system load detection, measured in seconds.
-S <scale size> sets the vertical scale of the chart. The unit is calculated in columns.
-V displays the version information.

------------------------------------------------------


Swatch (simple watcher)

Function Description: System Monitoring Program.

Syntax: swatch [-A <delimiter>] [-c <setting File>] [-f <Record File>] [-I <delimiter>] [-P <delimiter>] [-r <time>] [-t <Record File>]

Note: swatch can be used to monitor system records and perform specified actions when a specific event is detected. The events monitored by swatch and the actions of the corresponding events are stored in the swatch configuration file. The default configuration file is. swatchrc under the root directory. However, in Red Hat Linux, the default root directory does not exist. in the swatchrc configuration file, you can set/usr/doc/swatch-2.2/config_files/swatchrc. copy the personal file to. swatchrc, and then modify. the event to be monitored and the action to be executed by swatchrc.

Parameters:
-A <delimiter> specifies the delimiter of an action in the preset configuration file. The Delimiter is A comma.
-C Configuration File> specifies the configuration file, instead of the preset configuration file.
-F Record File> check the specified record file. After the check, it will not continue to monitor the record file.
-I delimiter> specifies the delimiter of the input record. It is a line break character by default.
-P delimiter> specifies the delimiter of events in the configuration file. The default Delimiter is comma.
-R time> restart at the specified time.
-T <Record File> checks the specified record file and monitors the subsequent records added to the record file.

----------------------------------------------------------


Suspend

Function Description: Pause shell execution.

Syntax: suspend [-f]

Note: suspend is a built-in shell command to suspend the shell currently being executed. To recover, you must use SIGCONT information.

Parameters:
-F if the currently executed shell is the login shell, the suspend cannot be paused by default. To force the shell to suspend logon, you must use the-f parameter.

-----------------------------------------------------


Sudo

Function Description: execute commands in other identities.

Syntax: sudo [-bhHpV] [-s] [-u <user>] [command] or sudo [-klv]

Note: sudo allows users to execute specified commands with other identities. The default identity is root. Users who have set sudo instructions in/etc/sudoers. If an unauthorized user attempts to use sudo, a warning email is sent to the Administrator. When using sudo, you must first enter the password, and then have a 5-minute validity period. If the validity period is exceeded, you must re-enter the password.
Parameters:
-B executes commands in the background.
-H: displays help.
-H: Set the HOME environment variable as the HOME environment variable of the new identity.
-K indicates the validity period of the end password, that is, you need to enter the password next time you execute sudo.
-L list currently executable and unexecutable commands.
-P: the prompt symbol for changing the query password.
-S executes the specified shell.
-U <user> uses the specified user as the new identity. If this parameter is not added, the new identity is root by default.
-V the password can be extended for 5 minutes.
-V displays the version information.

--------------------------------------------------------


Su (super user)

Function Description: Change the user identity.

Syntax: su [-flmp] [-- help] [-- version] [-] [-c <command>] [-s] [User Account]

Note: su allows users to temporarily change their login identities. Enter the user account and password to be changed.

Parameters:
-C <command> or -- command = <command> restores the original identity after the specified command is executed.
-F or -- fast is applicable to csh and tsch, so that the shell does not need to read the Startup File.
-.-L or -- when login changes its identity, the working directory, HOME, SHELL, USER, and LOGNAME are also changed. In addition, the PATH variable is also changed.
-M,-p, or -- preserve-environment do not change environment variables when changing identities.
-S or -- shell = specifies the shell to be executed.
-- Help: displays help.
-- Version: displays the version information.
[User Account] specifies the user to change. If this parameter is not specified, it is changed to root by default.

------------------------------------------------------


Sliplogin

Function Description: add the SLIP interface to the standard input.

Syntax: sliplogin [user name]

Note: sliplogin can add the SLIP interface to the standard input, and change the line of a general terminal to a SLIP line. Generally, it can be used to create a SLIP Server to connect the remote computer to the server using a SLIP. Sliplogin checks whether the/etc/slip. hosts file has the same user name. After the check, sliplogin will call and execute shell script to set the network interface environment such as IP address and subnet mask. This shell script is usually/etc/slip. login.

---------------------------------------------------


Shutdown

Function Description: system shutdown command.

Syntax: shutdown [-efFhknr] [-t seconds] [time] [Warning Information]

Note: The shutdown command can shut down all programs and restart or shut down the program as needed.

Parameters:
-C when executing the "shutdown-h 11: 50" command, you only need to press the + key to interrupt the command for shutdown.
-F: fsck is not executed during restart.
-F: Execute fsck when restarting.
-H: Shut down the system.
-K only sends information to all users, but does not actually shut down.
-N does not call the init program to shut down, but is implemented by shutdown itself.
-R shutdown and restart.
-T <seconds> how many seconds does it take to send the warning message and delete the message.
[Time] How long will the shutdown command be executed.
[Warning Information] information to be sent to all login users.

-----------------------------------------------------------


Screen

Function Description: multiple windows management programs.

Syntax: screen [-AmRvx-ls-wipe] [-d <job Name>] [-h <number of rows>] [-r <job Name>] [-s] [-S <job Name>]

Note: screen is a multi-window management program. The so-called window refers to a full-screen text screen. The screen program is usually used only when you use telnet to log on to the host or when you use an older terminal.

Parameters:
-A adjusted all windows to the current terminal size.
-D <job Name>: offline the specified screen job.
-H <number of rows> specifies the number of buffer rows in the window.
-M creates a new screen job even if the screen job is already in the job.
-R <job Name> restores an offline screen job.
-R first tries to restore the offline job. If an offline job cannot be found, a new screen job is created.
-S specifies the shell to be executed when a new window is created.
-S <job Name> specifies the name of the screen job.
-V displays the version information.
-X restores the offline screen job.
-Ls or -- list displays all current screen jobs.
-Wipe checks all current screen jobs and deletes unusable screen jobs.

----------------------------------------------------


Rwho

Function Description: view system users.

Syntax: rwho [-a]

Note: The effect of the rwho command is similar to that of the who command, but it displays the users of all hosts in the LAN. The host must provide the rwhod resident service function before using the rwho command.

Parameters:
-A lists all users, including those who have been idle for more than one hour.

----------------------------------------------------


Rsh (remote shell)

Function Description: Remote Shell.

Syntax: rsh [-dn] [-l <User Name>] [host name or IP address] [Execute Command]

Note: rsh provides the user environment, that is, Shell, so that commands can be executed on the specified remote host.

Parameters:
-D uses the Socket-level troubleshooting function.
-L <User Name> specifies the name of the user to log on to the remote host.
-N refers to the input command number to a special peripheral device Codenamed/dev/null.

---------------------------------------------------------


Rlogin (remote login)

Function Description: Remote logon.
Syntax: rlogin [-8EL] [-e <Escape Character>] [-l <User Name>] [host name or IP address]

Note: Execute the rlogin command to start operations at the terminal stage and log on to the remote host.

Parameters:
-8: 8 characters can be entered.
-E delimiter> delimiter.
-E: filter out the escape characters.
-L User Name> specify the name of the user to log on to the remote host.
-L use the litout mode for remote logon.

-------------------------------------------------------


Renice

Function Description: Adjust the priority.

Syntax: renice [priority level] [-g <Program Group Name>...] [-p <program identification code>...] [-u <User Name>...]

Note: The renice command can reset the priority level of program execution. The priority of a program is specified by the program identification code. You can also specify a program group or user name to adjust the priority level and modify the priority of all programs belonging to the program group or user. The level range is from-20--19. Only the system administrator can change the priority of other user programs, and only the system administrator can set a negative number level.
Parameters:
-G <Program Group Name> uses the program group name to modify the priority of all programs belonging to the program group.
-P <program identifier> changes the priority level of the program. This parameter is a preset value.
-U <User Name> specifies the user name to modify the priority of all programs belonging to the user.

-------------------------------------------------------


Reboot

Function Description: restart the instance.

Syntax: dreboot [-dfinw]

Note: executing the reboot command can stop the system and restart it.

Parameters:
-D do not write data into the record file/var/tmp/wtmp upon re-boot. This parameter has the effect of the "-n" parameter.
-F force reboot without calling the shutdown command.
-I disable all network interfaces before restarting the instance.
-N do not check whether there are unfinished programs before the reboot.
-W is only used for testing. It does not really restart the system. It only writes the data that is restarted to the wtmp record file in the/var/log directory.

-----------------------------------------------------


Pstree (process status tree)

Function Description: displays programs in a tree chart.

Syntax: pstree [-acGhlnpuUV] [-H <program identification code>] [<program identification code>/<User Name>]

Note: The pstree command uses ASCII characters to display the tree structure and clearly express the relationship between programs. If no program identification code or user name is specified, the first program at system startup will be regarded as the base layer and all subsequent programs will be displayed. If the user name is specified, the first program that belongs to the user is used as the base layer, and all programs of the user are displayed.

Parameters:
-A shows the complete commands of each program, including the path, parameters, or resident service labels.
-C does not use the simplified labeling method.
-G uses column plot characters of the VT100 terminal.
-H: Specifies the program to be executed when listing the tree chart.
-H <program identification code> the effect of this parameter is similar to that of the specified "-h" parameter, but it is particularly indicated by the specified program.
-L the tree chart is displayed in the long column format.
-N is sorted by the program identifier. Preferences are sorted by program names.
-P indicates the program identifier.
-U: displays the user name.
-U plot characters using UTF-8 columns.
-V displays the version information.

---------------------------------------------------------



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.